mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-08 00:44:39 -04:00
Squashed 'boost/' changes from d9443bc48..c27aa31f0
c27aa31f0 Updated Boost to v1.70.0 including iterator range math numeric crc circular_buffer multi_index intrusive git-subtree-dir: boost git-subtree-split: c27aa31f06ebf1a91b3fa3ae9df9b5efdf14ec9f
This commit is contained in:
@@ -8,8 +8,7 @@
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/type.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/type_traits/object_traits.hpp>
|
||||
# include <boost/type_traits/cv_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# include <boost/python/tag.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# include <boost/python/detail/invoke.hpp>
|
||||
# include <boost/python/detail/signature.hpp>
|
||||
# include <boost/python/detail/preprocessor.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
# include <boost/python/arg_from_python.hpp>
|
||||
# include <boost/python/converter/context_result_converter.hpp>
|
||||
@@ -31,9 +32,6 @@
|
||||
|
||||
# include <boost/compressed_pair.hpp>
|
||||
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
# include <boost/type_traits/is_convertible.hpp>
|
||||
|
||||
# include <boost/mpl/apply.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
@@ -50,7 +48,7 @@ inline PyObject* get(mpl::int_<N>, PyObject* const& args_)
|
||||
return PyTuple_GET_ITEM(args_,N);
|
||||
}
|
||||
|
||||
inline unsigned arity(PyObject* const& args_)
|
||||
inline Py_ssize_t arity(PyObject* const& args_)
|
||||
{
|
||||
return PyTuple_GET_SIZE(args_);
|
||||
}
|
||||
@@ -111,6 +109,23 @@ struct converter_target_type <void_result_to_python >
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
// Generation of ret moved from caller_arity<N>::impl::signature to here due to "feature" in MSVC 15.7.2 with /O2
|
||||
// which left the ret uninitialized and caused segfaults in Python interpreter.
|
||||
template<class Policies, class Sig> const signature_element* get_ret()
|
||||
{
|
||||
typedef BOOST_DEDUCED_TYPENAME Policies::template extract_return_type<Sig>::type rtype;
|
||||
typedef typename select_result_converter<Policies, rtype>::type result_converter;
|
||||
|
||||
static const signature_element ret = {
|
||||
(is_void<rtype>::value ? "void" : type_id<rtype>().name())
|
||||
, &detail::converter_target_type<result_converter>::get_pytype
|
||||
, boost::detail::indirect_traits::is_reference_to_non_const<rtype>::value
|
||||
};
|
||||
|
||||
return &ret;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -231,16 +246,12 @@ struct caller_arity<N>
|
||||
{
|
||||
const signature_element * sig = detail::signature<Sig>::elements();
|
||||
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
|
||||
// MSVC 15.7.2, when compiling to /O2 left the static const signature_element ret,
|
||||
// originally defined here, uninitialized. This in turn led to SegFault in Python interpreter.
|
||||
// Issue is resolved by moving the generation of ret to separate function in detail namespace (see above).
|
||||
const signature_element * ret = detail::get_ret<Policies, Sig>();
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME Policies::template extract_return_type<Sig>::type rtype;
|
||||
typedef typename select_result_converter<Policies, rtype>::type result_converter;
|
||||
|
||||
static const signature_element ret = {
|
||||
(boost::is_void<rtype>::value ? "void" : type_id<rtype>().name())
|
||||
, &detail::converter_target_type<result_converter>::get_pytype
|
||||
, boost::detail::indirect_traits::is_reference_to_non_const<rtype>::value
|
||||
};
|
||||
py_func_sig_info res = {sig, &ret };
|
||||
py_func_sig_info res = {sig, ret };
|
||||
#else
|
||||
py_func_sig_info res = {sig, sig };
|
||||
#endif
|
||||
|
||||
@@ -64,31 +64,18 @@
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_PYTHON_DYNAMIC_LIB)
|
||||
|
||||
# if !defined(_WIN32) && !defined(__CYGWIN__) \
|
||||
&& !defined(BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY) \
|
||||
&& BOOST_WORKAROUND(__GNUC__, >= 3) && (__GNUC_MINOR__ >=5 || __GNUC__ > 3)
|
||||
# define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
|
||||
# endif
|
||||
|
||||
# if BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY
|
||||
# if defined(BOOST_SYMBOL_EXPORT)
|
||||
# if defined(BOOST_PYTHON_SOURCE)
|
||||
# define BOOST_PYTHON_DECL __attribute__ ((__visibility__("default")))
|
||||
# define BOOST_PYTHON_DECL BOOST_SYMBOL_EXPORT
|
||||
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_EXPORT
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_EXPORT
|
||||
# define BOOST_PYTHON_BUILD_DLL
|
||||
# else
|
||||
# define BOOST_PYTHON_DECL
|
||||
# endif
|
||||
# define BOOST_PYTHON_DECL_FORWARD
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION __attribute__ ((__visibility__("default")))
|
||||
# elif (defined(_WIN32) || defined(__CYGWIN__))
|
||||
# if defined(BOOST_PYTHON_SOURCE)
|
||||
# define BOOST_PYTHON_DECL __declspec(dllexport)
|
||||
# define BOOST_PYTHON_BUILD_DLL
|
||||
# else
|
||||
# define BOOST_PYTHON_DECL __declspec(dllimport)
|
||||
# define BOOST_PYTHON_DECL BOOST_SYMBOL_IMPORT
|
||||
# define BOOST_PYTHON_DECL_FORWARD BOOST_SYMBOL_FORWARD_IMPORT
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_EXCEPTION_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_PYTHON_DECL
|
||||
@@ -96,11 +83,11 @@
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_PYTHON_DECL_FORWARD
|
||||
# define BOOST_PYTHON_DECL_FORWARD BOOST_PYTHON_DECL
|
||||
# define BOOST_PYTHON_DECL_FORWARD
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_PYTHON_DECL_EXCEPTION
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION BOOST_PYTHON_DECL
|
||||
# define BOOST_PYTHON_DECL_EXCEPTION
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
|
||||
@@ -118,7 +105,9 @@
|
||||
// Set the name of our library, this will get undef'ed by auto_link.hpp
|
||||
// once it's done with it:
|
||||
//
|
||||
#define BOOST_LIB_NAME boost_python
|
||||
#define _BOOST_PYTHON_CONCAT(N, M, m) N ## M ## m
|
||||
#define BOOST_PYTHON_CONCAT(N, M, m) _BOOST_PYTHON_CONCAT(N, M, m)
|
||||
#define BOOST_LIB_NAME BOOST_PYTHON_CONCAT(boost_python, PY_MAJOR_VERSION, PY_MINOR_VERSION)
|
||||
//
|
||||
// If we're importing code from a dll, then tell auto_link.hpp about it:
|
||||
//
|
||||
@@ -131,6 +120,9 @@
|
||||
#include <boost/config/auto_link.hpp>
|
||||
#endif // auto-linking disabled
|
||||
|
||||
#undef BOOST_PYTHON_CONCAT
|
||||
#undef _BOOST_PYTHON_CONCAT
|
||||
|
||||
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
|
||||
#define BOOST_PYTHON_SUPPORTS_PY_SIGNATURES // enables smooth transition
|
||||
#endif
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
# if defined(__EDG_VERSION__) && __EDG_VERSION__ <= 241
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/type_traits/conversion_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# endif
|
||||
|
||||
// Supplies a runtime is_convertible check which can be used with tag
|
||||
// dispatching to work around the Metrowerks Pro7 limitation with boost::is_convertible
|
||||
// dispatching to work around the Metrowerks Pro7 limitation with boost/std::is_convertible
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
typedef char* yes_convertible;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef CV_CATEGORY_DWA200222_HPP
|
||||
# define CV_CATEGORY_DWA200222_HPP
|
||||
# include <boost/type_traits/cv_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
@@ -26,8 +26,8 @@ struct cv_category
|
||||
// BOOST_STATIC_CONSTANT(bool, c = is_const<T>::value);
|
||||
// BOOST_STATIC_CONSTANT(bool, v = is_volatile<T>::value);
|
||||
typedef cv_tag<
|
||||
::boost::is_const<T>::value
|
||||
, ::boost::is_volatile<T>::value
|
||||
is_const<T>::value
|
||||
, is_volatile<T>::value
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright Gottfried Ganßauge 2003.
|
||||
// Copyright Gottfried Ganßauge 2003.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
# include <boost/python/type_id.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/type_traits/cv_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
# define DEF_HELPER_DWA200287_HPP
|
||||
|
||||
# include <boost/python/args.hpp>
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# include <boost/mpl/not.hpp>
|
||||
# include <boost/mpl/and.hpp>
|
||||
# include <boost/mpl/or.hpp>
|
||||
# include <boost/type_traits/add_reference.hpp>
|
||||
# include <boost/mpl/lambda.hpp>
|
||||
# include <boost/mpl/apply.hpp>
|
||||
# include <boost/tuple/tuple.hpp>
|
||||
@@ -73,7 +72,8 @@ namespace detail
|
||||
struct tuple_extract_base_select
|
||||
{
|
||||
typedef typename Tuple::head_type head_type;
|
||||
typedef typename mpl::apply1<Predicate, typename add_reference<head_type>::type>::type match_t;
|
||||
typedef typename mpl::apply1<Predicate,
|
||||
typename add_lvalue_reference<head_type>::type>::type match_t;
|
||||
BOOST_STATIC_CONSTANT(bool, match = match_t::value);
|
||||
typedef typename tuple_extract_impl<match>::template apply<Tuple,Predicate> type;
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define DEFAULTS_DEF_JDG20020811_HPP
|
||||
|
||||
#include <boost/python/detail/defaults_gen.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/python/detail/type_traits.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
@@ -238,7 +238,7 @@ namespace detail
|
||||
typedef typename OverloadsT::non_void_return_type non_void_return_type;
|
||||
|
||||
typedef typename mpl::if_c<
|
||||
boost::is_same<void, return_type>::value
|
||||
is_same<void, return_type>::value
|
||||
, void_return_type
|
||||
, non_void_return_type
|
||||
>::type stubs_type;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef DESTROY_DWA2002221_HPP
|
||||
# define DESTROY_DWA2002221_HPP
|
||||
|
||||
# include <boost/type_traits/is_array.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
@@ -30,7 +30,7 @@ struct value_destroyer<true>
|
||||
for (T const volatile* p = first; p != first + sizeof(A)/sizeof(T); ++p)
|
||||
{
|
||||
value_destroyer<
|
||||
boost::is_array<T>::value
|
||||
is_array<T>::value
|
||||
>::execute(p);
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ inline void destroy_referent_impl(void* p, T& (*)())
|
||||
// note: cv-qualification needed for MSVC6
|
||||
// must come *before* T for metrowerks
|
||||
value_destroyer<
|
||||
(boost::is_array<T>::value)
|
||||
(is_array<T>::value)
|
||||
>::execute((const volatile T*)p);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
struct BOOST_PYTHON_DECL_FORWARD exception_handler;
|
||||
struct exception_handler;
|
||||
|
||||
typedef function2<bool, exception_handler const&, function0<void> const&> handler_function;
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
# include <boost/python/detail/preprocessor.hpp>
|
||||
# include <boost/python/detail/none.hpp>
|
||||
|
||||
# include <boost/type_traits/is_member_function_pointer.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/facilities/intercept.hpp>
|
||||
# include <boost/preprocessor/repetition/enum_trailing_params.hpp>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
BOOST_PYTHON_IS_XXX_DEF(shared_ptr, shared_ptr, 1)
|
||||
#if __cplusplus >= 201103L
|
||||
#if !defined(BOOST_NO_CXX11_SMART_PTR)
|
||||
template <typename T>
|
||||
struct is_shared_ptr<std::shared_ptr<T> > : std::true_type {};
|
||||
#endif
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
# include <cstddef>
|
||||
# include <boost/type.hpp>
|
||||
# include <boost/type_traits/array_traits.hpp>
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
|
||||
|
||||
@@ -6,11 +6,9 @@
|
||||
# define TRANSLATE_EXCEPTION_TDS20091020_HPP
|
||||
|
||||
# include <boost/python/detail/exception_handler.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
# include <boost/call_traits.hpp>
|
||||
# include <boost/type_traits/add_const.hpp>
|
||||
# include <boost/type_traits/add_reference.hpp>
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
|
||||
# include <boost/function/function0.hpp>
|
||||
|
||||
@@ -33,7 +31,7 @@ struct translate_exception
|
||||
typename add_const<ExceptionType>::type
|
||||
>::type exception_non_ref;
|
||||
# else
|
||||
typedef typename add_reference<
|
||||
typedef typename add_lvalue_reference<
|
||||
typename add_const<ExceptionType>::type
|
||||
>::type exception_cref;
|
||||
# endif
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
// Copyright Shreyans Doshi 2017.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_PYTHON_DETAIL_TYPE_TRAITS_HPP
|
||||
# define BOOST_PYTHON_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#ifdef BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# include <boost/type_traits/transform_traits.hpp>
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/type_traits/cv_traits.hpp>
|
||||
# include <boost/type_traits/is_polymorphic.hpp>
|
||||
# include <boost/type_traits/composite_traits.hpp>
|
||||
# include <boost/type_traits/conversion_traits.hpp>
|
||||
# include <boost/type_traits/add_pointer.hpp>
|
||||
# include <boost/type_traits/remove_pointer.hpp>
|
||||
# include <boost/type_traits/is_void.hpp>
|
||||
# include <boost/type_traits/object_traits.hpp>
|
||||
# include <boost/type_traits/add_lvalue_reference.hpp>
|
||||
# include <boost/type_traits/function_traits.hpp>
|
||||
# include <boost/type_traits/is_scalar.hpp>
|
||||
# include <boost/type_traits/alignment_traits.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
#else
|
||||
# include <type_traits>
|
||||
#endif
|
||||
|
||||
# include <boost/type_traits/is_base_and_derived.hpp>
|
||||
# include <boost/type_traits/alignment_traits.hpp>
|
||||
# include <boost/type_traits/has_trivial_copy.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
using boost::alignment_of;
|
||||
using boost::add_const;
|
||||
using boost::add_cv;
|
||||
using boost::add_lvalue_reference;
|
||||
using boost::add_pointer;
|
||||
|
||||
using boost::is_array;
|
||||
using boost::is_class;
|
||||
using boost::is_const;
|
||||
using boost::is_convertible;
|
||||
using boost::is_enum;
|
||||
using boost::is_function;
|
||||
using boost::is_integral;
|
||||
using boost::is_lvalue_reference;
|
||||
using boost::is_member_function_pointer;
|
||||
using boost::is_member_pointer;
|
||||
using boost::is_pointer;
|
||||
using boost::is_polymorphic;
|
||||
using boost::is_reference;
|
||||
using boost::is_same;
|
||||
using boost::is_scalar;
|
||||
using boost::is_union;
|
||||
using boost::is_void;
|
||||
using boost::is_volatile;
|
||||
|
||||
using boost::remove_reference;
|
||||
using boost::remove_pointer;
|
||||
using boost::remove_cv;
|
||||
using boost::remove_const;
|
||||
|
||||
using boost::mpl::true_;
|
||||
using boost::mpl::false_;
|
||||
#else
|
||||
using std::alignment_of;
|
||||
using std::add_const;
|
||||
using std::add_cv;
|
||||
using std::add_lvalue_reference;
|
||||
using std::add_pointer;
|
||||
|
||||
using std::is_array;
|
||||
using std::is_class;
|
||||
using std::is_const;
|
||||
using std::is_convertible;
|
||||
using std::is_enum;
|
||||
using std::is_function;
|
||||
using std::is_integral;
|
||||
using std::is_lvalue_reference;
|
||||
using std::is_member_function_pointer;
|
||||
using std::is_member_pointer;
|
||||
using std::is_pointer;
|
||||
using std::is_polymorphic;
|
||||
using std::is_reference;
|
||||
using std::is_same;
|
||||
using std::is_scalar;
|
||||
using std::is_union;
|
||||
using std::is_void;
|
||||
using std::is_volatile;
|
||||
|
||||
using std::remove_reference;
|
||||
using std::remove_pointer;
|
||||
using std::remove_cv;
|
||||
using std::remove_const;
|
||||
|
||||
typedef std::integral_constant<bool, true> true_;
|
||||
typedef std::integral_constant<bool, false> false_;
|
||||
#endif
|
||||
using boost::is_base_and_derived;
|
||||
using boost::type_with_alignment;
|
||||
using boost::has_trivial_copy;
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
|
||||
#endif //BOOST_DETAIL_TYPE_TRAITS_HPP
|
||||
@@ -7,17 +7,19 @@
|
||||
|
||||
# include <boost/python/detail/cv_category.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/type_traits/object_traits.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
#ifndef _MSC_VER //if forward declared, msvc6.5 does not recognize them as inline
|
||||
// forward declaration, required (at least) by Tru64 cxx V6.5-042
|
||||
#if (!defined(_MSC_VER) || _MSC_VER >= 1915)
|
||||
// If forward declared, msvc6.5 does not recognize them as inline.
|
||||
// However, as of msvc14.15 (_MSC_VER 1915/Visual Studio 15.8.0) name lookup is now consistent with other compilers.
|
||||
// forward declaration, required (at least) by Tru64 cxx V6.5-042 and msvc14.15
|
||||
template <class Generator, class U>
|
||||
inline typename Generator::result_type
|
||||
unwind_type(U const& p, Generator* = 0);
|
||||
|
||||
// forward declaration, required (at least) by Tru64 cxx V6.5-042
|
||||
// forward declaration, required (at least) by Tru64 cxx V6.5-042 and msvc14.15
|
||||
template <class Generator, class U>
|
||||
inline typename Generator::result_type
|
||||
unwind_type(boost::type<U>*p = 0, Generator* = 0);
|
||||
@@ -83,7 +85,7 @@ struct unwind_helper<false>
|
||||
|
||||
template <class Generator, class U>
|
||||
inline typename Generator::result_type
|
||||
#ifndef _MSC_VER
|
||||
#if (!defined(_MSC_VER) || _MSC_VER >= 1915)
|
||||
unwind_type(U const& p, Generator*)
|
||||
#else
|
||||
unwind_type(U const& p, Generator* = 0)
|
||||
@@ -148,17 +150,17 @@ struct unwind_helper2<reference_to_pointer_>
|
||||
// why bother?
|
||||
template <class Generator, class U>
|
||||
inline typename Generator::result_type
|
||||
#ifndef _MSC_VER
|
||||
#if (!defined(_MSC_VER) || _MSC_VER >= 1915)
|
||||
unwind_type(boost::type<U>*, Generator*)
|
||||
#else
|
||||
unwind_type(boost::type<U>*p =0, Generator* =0)
|
||||
#endif
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, indirection
|
||||
= (boost::is_pointer<U>::value ? pointer_ : 0)
|
||||
= (is_pointer<U>::value ? pointer_ : 0)
|
||||
+ (indirect_traits::is_reference_to_pointer<U>::value
|
||||
? reference_to_pointer_
|
||||
: boost::is_reference<U>::value
|
||||
: is_lvalue_reference<U>::value
|
||||
? reference_
|
||||
: 0));
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
# include <boost/python/detail/copy_ctor_mutates_rhs.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/type_traits/add_reference.hpp>
|
||||
# include <boost/type_traits/add_const.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
@@ -16,7 +15,7 @@ struct value_arg
|
||||
: mpl::if_<
|
||||
copy_ctor_mutates_rhs<T>
|
||||
, T
|
||||
, typename add_reference<
|
||||
, typename add_lvalue_reference<
|
||||
typename add_const<T>::type
|
||||
>::type
|
||||
>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/preprocessor/enum_params.hpp>
|
||||
|
||||
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
# include <boost/python/detail/is_xxx.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
# define BOOST_PYTHON_VALUE_IS_XXX_DEF(name, qualified_name, nargs) \
|
||||
template <class X_> \
|
||||
struct value_is_##name \
|
||||
@@ -24,9 +24,10 @@ struct value_is_##name \
|
||||
typename remove_reference<X_>::type \
|
||||
>::type \
|
||||
>::value); \
|
||||
typedef mpl::bool_<value> type; \
|
||||
typedef mpl::bool_<value> type; \
|
||||
\
|
||||
};
|
||||
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
#endif // VALUE_IS_XXX_DWA2003224_HPP
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#ifndef VOID_PTR_DWA200239_HPP
|
||||
# define VOID_PTR_DWA200239_HPP
|
||||
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
|
||||
@@ -47,6 +47,13 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// pyconfig.h defines a macro with hypot name, what breaks libstdc++ math headers
|
||||
// that Python.h tries to include afterwards.
|
||||
#if defined(__MINGW32__)
|
||||
# include <cmath>
|
||||
# include <math.h>
|
||||
#endif
|
||||
|
||||
# include <pyconfig.h>
|
||||
# if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION >= 740
|
||||
# undef _POSIX_C_SOURCE
|
||||
@@ -83,6 +90,7 @@
|
||||
// than MSVC on Win32
|
||||
//
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
|
||||
# if defined(__GNUC__) && defined(__CYGWIN__)
|
||||
|
||||
# if defined(__LP64__)
|
||||
@@ -145,12 +153,38 @@ typedef int pid_t;
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# if defined(__has_warning)
|
||||
# define BOOST_PYTHON_GCC_HAS_WREGISTER __has_warning("-Wregister")
|
||||
# else
|
||||
# define BOOST_PYTHON_GCC_HAS_WREGISTER __GNUC__ >= 7
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_PYTHON_GCC_HAS_WREGISTER 0
|
||||
#endif
|
||||
|
||||
// Python.h header uses `register` keyword until Python 3.4
|
||||
#if BOOST_PYTHON_GCC_HAS_WREGISTER
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wregister"
|
||||
#elif defined(_MSC_VER)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 5033) // 'register' is no longer a supported storage class
|
||||
#endif
|
||||
|
||||
#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION == 2 && PY_MICRO_VERSION < 2
|
||||
# include <boost/python/detail/python22_fixed.h>
|
||||
#else
|
||||
# include <Python.h>
|
||||
#endif
|
||||
|
||||
#if BOOST_PYTHON_GCC_HAS_WREGISTER
|
||||
# pragma GCC diagnostic pop
|
||||
#elif defined(_MSC_VER)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
#undef BOOST_PYTHON_GCC_HAS_WREGISTER
|
||||
|
||||
#ifdef BOOST_PYTHON_ULONG_MAX_UNDEFINED
|
||||
# undef ULONG_MAX
|
||||
# undef BOOST_PYTHON_ULONG_MAX_UNDEFINED
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
# define WRAPPER_BASE_DWA2004722_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
# include <boost/type_traits/is_polymorphic.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/python/detail/type_traits.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -14,21 +13,21 @@ class override;
|
||||
|
||||
namespace detail
|
||||
{
|
||||
class BOOST_PYTHON_DECL_FORWARD wrapper_base;
|
||||
class wrapper_base;
|
||||
|
||||
namespace wrapper_base_ // ADL disabler
|
||||
{
|
||||
inline PyObject* get_owner(wrapper_base const volatile& w);
|
||||
|
||||
inline PyObject*
|
||||
owner_impl(void const volatile* /*x*/, mpl::false_)
|
||||
owner_impl(void const volatile* /*x*/, detail::false_)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline PyObject*
|
||||
owner_impl(T const volatile* x, mpl::true_);
|
||||
owner_impl(T const volatile* x, detail::true_);
|
||||
|
||||
template <class T>
|
||||
inline PyObject*
|
||||
@@ -59,7 +58,7 @@ namespace detail
|
||||
{
|
||||
template <class T>
|
||||
inline PyObject*
|
||||
owner_impl(T const volatile* x, mpl::true_)
|
||||
owner_impl(T const volatile* x, detail::true_)
|
||||
{
|
||||
if (wrapper_base const volatile* w = dynamic_cast<wrapper_base const volatile*>(x))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user