23 #ifndef LUABIND_VALUE_WRAPPER_050419_HPP 24 #define LUABIND_VALUE_WRAPPER_050419_HPP 26 #include <boost/mpl/integral_c.hpp> 27 #include <boost/mpl/bool.hpp> 28 #include <boost/mpl/aux_/msvc_eti_base.hpp> 30 #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 31 # define LUABIND_USE_VALUE_WRAPPER_TAG 35 #ifdef LUABIND_USE_VALUE_WRAPPER_TAG 36 # include <boost/mpl/identity.hpp> 37 # include <boost/mpl/eval_if.hpp> 38 # include <boost/mpl/has_xxx.hpp> 39 # include <boost/mpl/not.hpp> 40 # include <boost/mpl/and.hpp> 41 # include <boost/mpl/or.hpp> 42 # include <boost/type_traits/is_reference.hpp> 43 # include <boost/type_traits/is_pointer.hpp> 44 # include <boost/type_traits/is_array.hpp> 53 #ifdef LUABIND_USE_VALUE_WRAPPER_TAG 55 struct value_wrapper_traits;
60 BOOST_MPL_HAS_XXX_TRAIT_DEF(value_wrapper_tag);
62 struct unspecialized_value_wrapper_traits
64 typedef boost::mpl::false_ is_specialized;
68 struct value_wrapper_traits_aux
70 typedef value_wrapper_traits<typename T::value_wrapper_tag> type;
78 #ifdef LUABIND_USE_VALUE_WRAPPER_TAG
79 : boost::mpl::eval_if<
83 boost::is_reference<T>
84 , boost::is_pointer<T>
88 , detail::has_value_wrapper_tag<T>
90 , detail::value_wrapper_traits_aux<T>
91 , boost::mpl::identity<detail::unspecialized_value_wrapper_traits>
96 typedef boost::mpl::false_ is_specialized;
102 : boost::mpl::aux::msvc_eti_base<
103 typename value_wrapper_traits<T>::is_specialized
109 #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 111 # include <boost/type_traits/remove_const.hpp> 112 # include <boost/type_traits/remove_reference.hpp> 119 typename boost::remove_const<
120 typename boost::remove_reference<T>::type
129 # include <luabind/detail/yes_no.hpp> 130 # include <boost/type_traits/add_reference.hpp> 139 yes_t to_yesno(boost::mpl::true_);
140 no_t to_yesno(boost::mpl::false_);
143 struct is_value_wrapper_arg_aux
145 static typename boost::add_reference<T>::type x;
147 BOOST_STATIC_CONSTANT(
bool,
value =
148 sizeof(to_yesno(is_value_wrapper_arg_check(&x)))
152 typedef boost::mpl::bool_<value> type;
159 : detail::is_value_wrapper_arg_aux<T>::type
167 #endif // LUABIND_VALUE_WRAPPER_050419_HPP Definition: value_wrapper.hpp:101
Definition: PEtypes.h:507
Definition: enum_maker.hpp:46
Definition: value_wrapper.hpp:117
Definition: value_wrapper.hpp:77