mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 05:42:30 +00:00
MPL names/directory structure refactoring
[SVN r17651]
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
# include <boost/preprocessor/iteration/local.hpp>
|
||||
|
||||
# include <boost/python/detail/mpl_lambda.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
# include <boost/type.hpp>
|
||||
# include <cstddef>
|
||||
@@ -65,7 +65,7 @@ namespace detail
|
||||
BOOST_STATIC_CONSTANT(bool, is_key = is_keywords<key_t>::value);
|
||||
BOOST_STATIC_CONSTANT(bool, value = (is_ref & is_key));
|
||||
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_reference_to_keywords,(T))
|
||||
};
|
||||
# else
|
||||
@@ -89,7 +89,7 @@ namespace detail
|
||||
sizeof(detail::is_keywords_test( (void (*)(T))0 ))
|
||||
== sizeof(detail::yes_keywords_t)));
|
||||
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_reference_to_keywords,(T))
|
||||
};
|
||||
# endif
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# include <boost/type_traits/object_traits.hpp>
|
||||
# include <boost/python/detail/type_list.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/preprocessor/enum_params_with_a_default.hpp>
|
||||
# include <boost/preprocessor/enum_params.hpp>
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace boost { namespace python {
|
||||
{
|
||||
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template <class T> struct specifies_bases
|
||||
: mpl::false_c
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template < BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PYTHON_MAX_BASES, class Base) >
|
||||
struct specifies_bases< bases< BOOST_PYTHON_BASE_PARAMS > >
|
||||
: mpl::true_c
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
# else
|
||||
@@ -48,7 +48,7 @@ namespace boost { namespace python {
|
||||
BOOST_STATIC_CONSTANT(bool, non_ref = !is_reference<T>::value);
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = non_ref & (sizeof(is_bases_helper(make())) == 1));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
# endif
|
||||
template <class T, class Prev = bases<> >
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
# include <boost/mpl/size.hpp>
|
||||
# include <boost/mpl/for_each.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/logical/not.hpp>
|
||||
# include <boost/mpl/logical/or.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/not.hpp>
|
||||
# include <boost/mpl/or.hpp>
|
||||
|
||||
# include <boost/python/object/select_holder.hpp>
|
||||
# include <boost/python/object/class_wrapper.hpp>
|
||||
@@ -79,12 +79,12 @@ namespace detail
|
||||
struct operator_;
|
||||
|
||||
// Register to_python converters for a class T. The first argument
|
||||
// will be mpl::true_c unless noncopyable was specified as a
|
||||
// will be mpl::true_ unless noncopyable was specified as a
|
||||
// class_<...> template parameter. The 2nd argument is a pointer to
|
||||
// the type of holder that must be created. The 3rd argument is a
|
||||
// reference to the Python type object to be created.
|
||||
template <class T, class SelectHolder>
|
||||
inline void register_class_to_python(mpl::true_c copyable, SelectHolder selector, T* = 0)
|
||||
inline void register_class_to_python(mpl::true_ copyable, SelectHolder selector, T* = 0)
|
||||
{
|
||||
typedef typename SelectHolder::type holder;
|
||||
force_instantiate(objects::class_cref_wrapper<T, objects::make_instance<T,holder> >());
|
||||
@@ -92,7 +92,7 @@ namespace detail
|
||||
}
|
||||
|
||||
template <class T, class SelectHolder>
|
||||
inline void register_class_to_python(mpl::false_c copyable, SelectHolder selector, T* = 0)
|
||||
inline void register_class_to_python(mpl::false_ copyable, SelectHolder selector, T* = 0)
|
||||
{
|
||||
SelectHolder::register_();
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace detail
|
||||
static void
|
||||
must_be_derived_class_member(Default const&)
|
||||
{
|
||||
typedef typename assertion<mpl::logical_not<is_same<Default,Fn> > >::failed test0;
|
||||
typedef typename assertion<mpl::not_<is_same<Default,Fn> > >::failed test0;
|
||||
typedef typename assertion<is_polymorphic<T> >::failed test1;
|
||||
typedef typename assertion<is_member_function_pointer<Fn> >::failed test2;
|
||||
not_a_derived_class_member<Default>(Fn());
|
||||
@@ -398,7 +398,7 @@ class class_ : public objects::class_base
|
||||
, helper.policies(), helper.keywords())
|
||||
, helper.doc());
|
||||
|
||||
this->def_default(name, fn, helper, mpl::bool_c<Helper::has_default_implementation>());
|
||||
this->def_default(name, fn, helper, mpl::bool_<Helper::has_default_implementation>());
|
||||
}
|
||||
|
||||
//
|
||||
@@ -411,7 +411,7 @@ class class_ : public objects::class_base
|
||||
char const* name
|
||||
, Fn fn
|
||||
, Helper const& helper
|
||||
, mpl::bool_c<true>)
|
||||
, mpl::bool_<true>)
|
||||
{
|
||||
detail::error::virtual_function_default<T,Fn>::must_be_derived_class_member(
|
||||
helper.default_implementation());
|
||||
@@ -424,7 +424,7 @@ class class_ : public objects::class_base
|
||||
}
|
||||
|
||||
template <class Fn, class Helper>
|
||||
inline void def_default(char const*, Fn, Helper const&, mpl::bool_c<false>)
|
||||
inline void def_default(char const*, Fn, Helper const&, mpl::bool_<false>)
|
||||
{ }
|
||||
|
||||
//
|
||||
@@ -474,7 +474,7 @@ inline void class_<T,X1,X2,X3>::register_() const
|
||||
objects::register_class_from_python<T,bases>();
|
||||
|
||||
detail::register_class_to_python<T>(
|
||||
mpl::bool_c<is_copyable>()
|
||||
mpl::bool_<is_copyable>()
|
||||
# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
|
||||
, holder_selector::execute((held_type*)0)
|
||||
# elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
@@ -519,7 +519,7 @@ namespace detail
|
||||
{
|
||||
template <class T1, class T2, class T3>
|
||||
struct has_noncopyable
|
||||
: mpl::logical_or<
|
||||
: mpl::or_<
|
||||
is_same<T1,noncopyable>
|
||||
, is_same<T2,noncopyable>
|
||||
, is_same<T3,noncopyable>
|
||||
@@ -530,7 +530,7 @@ namespace detail
|
||||
template <class T, class Prev>
|
||||
struct select_held_type
|
||||
: mpl::if_<
|
||||
mpl::logical_or<
|
||||
mpl::or_<
|
||||
specifies_bases<T>
|
||||
, is_same<T,noncopyable>
|
||||
>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# include <boost/type_traits/function_traits.hpp>
|
||||
|
||||
|
||||
# include <boost/mpl/logical/or.hpp>
|
||||
# include <boost/mpl/or.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace converter {
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace detail
|
||||
, shared_ptr_arg_to_python<T>
|
||||
|
||||
, typename mpl::if_<
|
||||
mpl::logical_or<
|
||||
mpl::or_<
|
||||
is_function<T>
|
||||
, python::detail::is_pointer_to_function<T>
|
||||
, is_member_function_pointer<T>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# include <boost/type_traits/object_traits.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
// Facilities for dealing with types which always manage Python
|
||||
// objects. Some examples are object, list, str, et. al. Different
|
||||
@@ -118,14 +118,14 @@ struct object_manager_traits
|
||||
|
||||
template <class T>
|
||||
struct is_object_manager
|
||||
: mpl::bool_c<object_manager_traits<T>::is_specialized>
|
||||
: mpl::bool_<object_manager_traits<T>::is_specialized>
|
||||
{
|
||||
};
|
||||
|
||||
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template <class T>
|
||||
struct is_reference_to_object_manager
|
||||
: mpl::false_c
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace detail
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_object_manager_nonref
|
||||
: mpl::false_c
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
@@ -211,7 +211,7 @@ namespace detail
|
||||
== sizeof(detail::yes_reference_to_object_manager)
|
||||
)
|
||||
);
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
# include <boost/python/detail/void_return.hpp>
|
||||
# include <boost/python/errors.hpp>
|
||||
# include <boost/type_traits/has_trivial_copy.hpp>
|
||||
# include <boost/mpl/logical/and.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/and.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace converter {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# define COPY_CTOR_MUTATES_RHS_DWA2003219_HPP
|
||||
|
||||
#include <boost/python/detail/is_auto_ptr.hpp>
|
||||
#include <boost/mpl/bool_c.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
# include <boost/type_traits/ice.hpp>
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/mpl/logical/not.hpp>
|
||||
# include <boost/mpl/logical/and.hpp>
|
||||
# include <boost/mpl/logical/or.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>
|
||||
@@ -98,8 +98,8 @@ namespace detail
|
||||
struct doc_extract
|
||||
: tuple_extract<
|
||||
Tuple
|
||||
, mpl::logical_not<
|
||||
mpl::logical_or<
|
||||
, mpl::not_<
|
||||
mpl::or_<
|
||||
is_reference_to_class<mpl::_1>
|
||||
, is_reference_to_member_function_pointer<mpl::_1 >
|
||||
>
|
||||
@@ -118,10 +118,10 @@ namespace detail
|
||||
struct policy_extract
|
||||
: tuple_extract<
|
||||
Tuple
|
||||
, mpl::logical_and<
|
||||
mpl::logical_not<is_same<not_specified const&,mpl::_1> >
|
||||
, mpl::and_<
|
||||
mpl::not_<is_same<not_specified const&,mpl::_1> >
|
||||
, is_reference_to_class<mpl::_1 >
|
||||
, mpl::logical_not<is_reference_to_keywords<mpl::_1 > >
|
||||
, mpl::not_<is_reference_to_keywords<mpl::_1 > >
|
||||
>
|
||||
>
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace detail
|
||||
// template <typename OverloadsT, typename NameSpaceT>
|
||||
// inline void
|
||||
// define_stub_function(
|
||||
// char const* name, OverloadsT s, NameSpaceT& name_space, mpl::int_c<N>)
|
||||
// char const* name, OverloadsT s, NameSpaceT& name_space, mpl::int_<N>)
|
||||
// {
|
||||
// name_space.def(name, &OverloadsT::func_N);
|
||||
// }
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
# include <boost/type_traits/remove_reference.hpp>
|
||||
# include <boost/type_traits/remove_pointer.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
# ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
@@ -48,7 +48,7 @@ struct is_reference_to_const<T const volatile&>
|
||||
# endif
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function : mpl::bool_c<false>
|
||||
struct is_reference_to_function : mpl::bool_<false>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ struct is_reference_to_function<T&> : is_function<T>
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_pointer_to_function : mpl::bool_c<false>
|
||||
struct is_pointer_to_function : mpl::bool_<false>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
@@ -71,7 +71,7 @@ struct is_pointer_to_function<T*> : is_function<T>
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_member_function_pointer_impl : mpl::bool_c<false>
|
||||
struct is_reference_to_member_function_pointer_impl : mpl::bool_<false>
|
||||
{
|
||||
};
|
||||
|
||||
@@ -100,14 +100,14 @@ struct is_reference_to_function_pointer_aux
|
||||
typename remove_reference<T>::type
|
||||
>::type
|
||||
>::value));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function_pointer
|
||||
: mpl::if_c<
|
||||
is_reference_to_function<T>::value
|
||||
, mpl::bool_c<false>
|
||||
, mpl::bool_<false>
|
||||
, is_reference_to_function_pointer_aux<T>
|
||||
>::type
|
||||
{
|
||||
@@ -191,7 +191,7 @@ struct is_reference_to_class
|
||||
>::value
|
||||
>::value)
|
||||
);
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
|
||||
};
|
||||
|
||||
@@ -267,7 +267,7 @@ struct is_reference_to_function_aux
|
||||
|
||||
template <class T>
|
||||
struct is_reference_to_function
|
||||
: mpl::if_<is_reference<T>, is_reference_to_function_aux<T>, mpl::bool_c<false> >::type
|
||||
: mpl::if_<is_reference<T>, is_reference_to_function_aux<T>, mpl::bool_<false> >::type
|
||||
{
|
||||
};
|
||||
|
||||
@@ -278,12 +278,12 @@ struct is_pointer_to_function_aux
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value
|
||||
= sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_pointer_to_function
|
||||
: mpl::if_<is_pointer<T>, is_pointer_to_function_aux<T>, mpl::bool_c<false> >::type
|
||||
: mpl::if_<is_pointer<T>, is_pointer_to_function_aux<T>, mpl::bool_<false> >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_function,(T))
|
||||
};
|
||||
@@ -419,7 +419,7 @@ struct is_reference_to_function_pointer
|
||||
: mpl::if_<
|
||||
is_reference<T>
|
||||
, is_pointer_to_function_aux<T>
|
||||
, mpl::bool_c<false>
|
||||
, mpl::bool_<false>
|
||||
>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T))
|
||||
@@ -442,7 +442,7 @@ struct is_pointer_to_member_function_aux
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value
|
||||
= sizeof((member_function_pointer_helper)(t)) == sizeof(inner_yes_type));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
@@ -450,7 +450,7 @@ struct is_reference_to_member_function_pointer
|
||||
: mpl::if_<
|
||||
is_reference<T>
|
||||
, is_pointer_to_member_function_aux<T>
|
||||
, mpl::bool_c<false>
|
||||
, mpl::bool_<false>
|
||||
>::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
|
||||
@@ -469,7 +469,7 @@ struct is_reference_to_class
|
||||
= (is_reference<T>::value
|
||||
& (sizeof(reference_to_class_helper(t)) == sizeof(inner_yes_type)))
|
||||
);
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ BOOST_PYTHON_IS_XXX_DEF(auto_ptr, std::auto_ptr, 1)
|
||||
# else
|
||||
|
||||
template <class T>
|
||||
struct is_auto_ptr : mpl::false_c
|
||||
struct is_auto_ptr : mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# define IS_XXX_DWA2003224_HPP
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/preprocessor/enum_params.hpp>
|
||||
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
@@ -35,14 +35,14 @@ struct is_##name \
|
||||
= !is_reference<X_>::value \
|
||||
& (sizeof(test(dummy, 0)) == sizeof(yes))); \
|
||||
\
|
||||
typedef mpl::bool_c<value> type; \
|
||||
typedef mpl::bool_<value> type; \
|
||||
};
|
||||
|
||||
# else
|
||||
|
||||
# define BOOST_PYTHON_IS_XXX_DEF(name, qualified_name, nargs) \
|
||||
template <class T> \
|
||||
struct is_##name : mpl::false_c \
|
||||
struct is_##name : mpl::false_ \
|
||||
{ \
|
||||
}; \
|
||||
\
|
||||
@@ -50,7 +50,7 @@ template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \
|
||||
struct is_##name< \
|
||||
qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \
|
||||
> \
|
||||
: mpl::true_c \
|
||||
: mpl::true_ \
|
||||
{ \
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ template <class F, class Policies>
|
||||
object make_keyword_range_function(F f, Policies const& policies, keyword_range const& kw)
|
||||
{
|
||||
return detail::make_function_aux(
|
||||
f, policies, args_from_python(), detail::get_signature(f), kw, mpl::int_c<0>());
|
||||
f, policies, args_from_python(), detail::get_signature(f), kw, mpl::int_<0>());
|
||||
}
|
||||
|
||||
// Builds an '__init__' function which inserts the given Holder type
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
# include <boost/type.hpp>
|
||||
# include <boost/type_traits/array_traits.hpp>
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template <class T>
|
||||
struct is_string_literal : mpl::false_c
|
||||
struct is_string_literal : mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
# if !defined(__MWERKS__) || __MWERKS__ > 0x2407
|
||||
template <std::size_t n>
|
||||
struct is_string_literal<char const[n]> : mpl::true_c
|
||||
struct is_string_literal<char const[n]> : mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
@@ -31,7 +31,7 @@ struct is_string_literal<char const[n]> : mpl::true_c
|
||||
// This compiler mistakenly gets the type of string literals as char*
|
||||
// instead of char[NN].
|
||||
template <>
|
||||
struct is_string_literal<char* const> : mpl::true_c
|
||||
struct is_string_literal<char* const> : mpl::true_
|
||||
{
|
||||
};
|
||||
# endif
|
||||
@@ -63,7 +63,7 @@ struct string_literal_helper
|
||||
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value = sizeof(self::check(x)) == sizeof(yes_string_literal));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -71,7 +71,7 @@ template <>
|
||||
struct string_literal_helper<false>
|
||||
{
|
||||
template <class T>
|
||||
struct apply : mpl::false_c
|
||||
struct apply : mpl::false_
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# define VALUE_IS_XXX_DWA2003224_HPP
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/preprocessor/enum_params.hpp>
|
||||
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
@@ -35,7 +35,7 @@ struct value_is_##name \
|
||||
bool, value \
|
||||
= (sizeof(test(dummy, 0)) == sizeof(yes))); \
|
||||
\
|
||||
typedef mpl::bool_c<value> type; \
|
||||
typedef mpl::bool_<value> type; \
|
||||
};
|
||||
|
||||
# else
|
||||
@@ -54,7 +54,7 @@ struct value_is_##name \
|
||||
typename remove_reference<X_>::type \
|
||||
>::type \
|
||||
>::value); \
|
||||
typedef mpl::bool_c<value> type; \
|
||||
typedef mpl::bool_<value> type; \
|
||||
\
|
||||
};
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/push_front.hpp>
|
||||
#include <boost/mpl/iterator_range.hpp>
|
||||
#include <boost/mpl/logical/not.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
|
||||
# include <boost/python/detail/mpl_lambda.hpp>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <boost/mpl/find_if.hpp>
|
||||
#include <boost/mpl/fold.hpp>
|
||||
#include <boost/mpl/pop_front.hpp>
|
||||
#include <boost/mpl/bool_c.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace detail
|
||||
BOOST_STATIC_CONSTANT(
|
||||
bool, value =
|
||||
sizeof(f(t())) == sizeof(::boost::type_traits::yes_type));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
|
||||
BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_optional,(T))
|
||||
};
|
||||
@@ -127,7 +127,7 @@ namespace detail
|
||||
template <class T>
|
||||
struct is_optional : is_optional_impl<T>
|
||||
{
|
||||
typedef mpl::bool_c<is_optional_impl<T>::value> type;
|
||||
typedef mpl::bool_<is_optional_impl<T>::value> type;
|
||||
BOOST_PYTHON_MPL_LAMBDA_SUPPORT(1,is_optional,(T))
|
||||
};
|
||||
#endif // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# include <boost/python/object/function_object.hpp>
|
||||
|
||||
# include <boost/mpl/size.hpp>
|
||||
# include <boost/mpl/int_c.hpp>
|
||||
# include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace detail
|
||||
// As above, except that it accepts argument keywords. NumKeywords
|
||||
// is used only for a compile-time assertion to make sure the user
|
||||
// doesn't pass more keywords than the function can accept. To
|
||||
// disable all checking, pass mpl::int_c<0> for NumKeywords.
|
||||
// disable all checking, pass mpl::int_<0> for NumKeywords.
|
||||
template <class F, class CallPolicies, class ConverterGenerators, class Sig, class NumKeywords>
|
||||
object make_function_aux(
|
||||
F f
|
||||
@@ -93,7 +93,7 @@ object make_function(F f, CallPolicies const& policies, Keywords const& keywords
|
||||
, detail::args_from_python()
|
||||
, detail::get_signature(f)
|
||||
, keywords.range()
|
||||
, mpl::int_c<Keywords::size>()
|
||||
, mpl::int_<Keywords::size>()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,14 +41,14 @@ struct make_ptr_instance
|
||||
}
|
||||
|
||||
template <class U>
|
||||
static inline PyTypeObject* get_derived_class_object(mpl::true_c, U const volatile* x)
|
||||
static inline PyTypeObject* get_derived_class_object(mpl::true_, U const volatile* x)
|
||||
{
|
||||
converter::registration const* r = converter::registry::query(type_info(typeid(*x)));
|
||||
return r ? r->m_class_object : 0;
|
||||
}
|
||||
|
||||
template <class U>
|
||||
static inline PyTypeObject* get_derived_class_object(mpl::false_c, U*)
|
||||
static inline PyTypeObject* get_derived_class_object(mpl::false_, U*)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
|
||||
# include <boost/type.hpp>
|
||||
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/logical/or.hpp>
|
||||
# include <boost/mpl/or.hpp>
|
||||
|
||||
# include <boost/type_traits/same_traits.hpp>
|
||||
# include <boost/type_traits/is_base_and_derived.hpp>
|
||||
@@ -49,7 +49,7 @@ namespace detail
|
||||
// constructor. Normally this means U is a virtual function
|
||||
// dispatcher subclass for T.
|
||||
template <class T, class U>
|
||||
void check_default_constructible(T*, U*, mpl::bool_c<true>)
|
||||
void check_default_constructible(T*, U*, mpl::bool_<true>)
|
||||
{
|
||||
python::detail::force_instantiate(
|
||||
sizeof(specify_init_arguments_or_no_init_for_class_<T>(U((::PyObject*)0)))
|
||||
@@ -59,7 +59,7 @@ namespace detail
|
||||
// Handles the "normal" case where T is held directly and
|
||||
// has_back_reference<T> is not specialized.
|
||||
template <class T>
|
||||
void check_default_constructible(T*, T*, mpl::bool_c<false>)
|
||||
void check_default_constructible(T*, T*, mpl::bool_<false>)
|
||||
{
|
||||
python::detail::force_instantiate(
|
||||
sizeof(specify_init_arguments_or_no_init_for_class_<T>(T()))
|
||||
@@ -94,7 +94,7 @@ namespace detail
|
||||
|
||||
static void assert_default_constructible()
|
||||
{
|
||||
detail::check_default_constructible((T*)0,(Held*)0,mpl::bool_c<back_ref>());
|
||||
detail::check_default_constructible((T*)0,(Held*)0,mpl::bool_<back_ref>());
|
||||
}
|
||||
|
||||
typedef typename mpl::if_c<
|
||||
@@ -116,7 +116,7 @@ namespace detail
|
||||
|
||||
static void assert_default_constructible()
|
||||
{
|
||||
detail::check_default_constructible((T*)0,(pointee*)0,mpl::bool_c<back_ref>());
|
||||
detail::check_default_constructible((T*)0,(pointee*)0,mpl::bool_<back_ref>());
|
||||
}
|
||||
|
||||
typedef typename mpl::if_c<
|
||||
@@ -127,13 +127,13 @@ namespace detail
|
||||
|
||||
static inline void register_()
|
||||
{
|
||||
select_pointer_holder::register_(mpl::bool_c<back_ref>());
|
||||
select_pointer_holder::register_(mpl::bool_<back_ref>());
|
||||
}
|
||||
|
||||
static type* get() { return 0; }
|
||||
|
||||
private:
|
||||
static inline void register_(mpl::true_c)
|
||||
static inline void register_(mpl::true_)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
static inline void register_(mpl::false_c)
|
||||
static inline void register_(mpl::false_)
|
||||
{
|
||||
python::detail::force_instantiate(
|
||||
objects::class_value_wrapper<Ptr, make_ptr_instance<T,type> >());
|
||||
@@ -212,7 +212,7 @@ struct select_holder
|
||||
is_same<Held, python::detail::not_specified>
|
||||
, detail::select_value_holder<T,T>
|
||||
, typename mpl::if_<
|
||||
mpl::logical_or<
|
||||
mpl::or_<
|
||||
is_same<T,Held>
|
||||
, is_base_and_derived<T, Held>
|
||||
>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# endif
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/mpl/bool_c.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -40,13 +40,13 @@ inline pointer_wrapper<T> ptr(T t)
|
||||
# ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
template<typename T>
|
||||
class is_pointer_wrapper
|
||||
: public mpl::false_c
|
||||
: public mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class is_pointer_wrapper<pointer_wrapper<T> >
|
||||
: public mpl::true_c
|
||||
: public mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
@@ -110,7 +110,7 @@ class is_pointer_wrapper
|
||||
bool, value = (
|
||||
sizeof(detail::is_pointer_wrapper_test(boost::type<T>()))
|
||||
== sizeof(detail::yes_pointer_wrapper_t)));
|
||||
typedef mpl::bool_c<value> type;
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
# include <boost/type_traits/transform_traits.hpp>
|
||||
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/logical/or.hpp>
|
||||
# include <boost/mpl/or.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
@@ -80,7 +80,7 @@ struct to_python_value
|
||||
detail::value_is_shared_ptr<T>
|
||||
, detail::shared_ptr_to_python_value<T>
|
||||
, typename mpl::if_<
|
||||
mpl::logical_or<
|
||||
mpl::or_<
|
||||
converter::is_object_manager<T>
|
||||
, converter::is_reference_to_object_manager<T>
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user