1 // Copyright Shreyans Doshi 2017. 2 // Distributed under the Boost Software License, Version 1.0. (See 3 // accompanying file LICENSE_1_0.txt or copy at 4 // http://www.boost.org/LICENSE_1_0.txt) 5 6 #ifndef BOOST_PYTHON_DETAIL_TYPE_TRAITS_HPP 7 # define BOOST_PYTHON_DETAIL_TYPE_TRAITS_HPP 8 9 10 #include <boost/config.hpp> 11 #ifdef BOOST_NO_CXX11_HDR_TYPE_TRAITS 12 # include <boost/type_traits/transform_traits.hpp> 13 # include <boost/type_traits/same_traits.hpp> 14 # include <boost/type_traits/cv_traits.hpp> 15 # include <boost/type_traits/is_polymorphic.hpp> 16 # include <boost/type_traits/composite_traits.hpp> 17 # include <boost/type_traits/conversion_traits.hpp> 18 # include <boost/type_traits/add_pointer.hpp> 19 # include <boost/type_traits/remove_pointer.hpp> 20 # include <boost/type_traits/is_void.hpp> 21 # include <boost/type_traits/object_traits.hpp> 22 # include <boost/type_traits/add_lvalue_reference.hpp> 23 # include <boost/type_traits/function_traits.hpp> 24 # include <boost/type_traits/is_scalar.hpp> 25 # include <boost/type_traits/alignment_traits.hpp> 26 # include <boost/mpl/bool.hpp> 27 #else 28 # include <type_traits> 29 #endif 30 31 # include <boost/type_traits/is_base_and_derived.hpp> 32 # include <boost/type_traits/alignment_traits.hpp> 33 # include <boost/type_traits/has_trivial_copy.hpp> 34 35 36 namespace boost { namespace python { namespace detail { 37 38 #ifdef BOOST_NO_CXX11_HDR_TYPE_TRAITS 39 using boost::alignment_of; 40 using boost::add_const; 41 using boost::add_cv; 42 using boost::add_lvalue_reference; 43 using boost::add_pointer; 44 45 using boost::is_array; 46 using boost::is_class; 47 using boost::is_const; 48 using boost::is_convertible; 49 using boost::is_enum; 50 using boost::is_function; 51 using boost::is_integral; 52 using boost::is_lvalue_reference; 53 using boost::is_member_function_pointer; 54 using boost::is_member_pointer; 55 using boost::is_pointer; 56 using boost::is_polymorphic; 57 using boost::is_reference; 58 using boost::is_same; 59 using boost::is_scalar; 60 using boost::is_union; 61 using boost::is_void; 62 using boost::is_volatile; 63 64 using boost::remove_reference; 65 using boost::remove_pointer; 66 using boost::remove_cv; 67 using boost::remove_const; 68 69 using boost::mpl::true_; 70 using boost::mpl::false_; 71 #else 72 using std::alignment_of; 73 using std::add_const; 74 using std::add_cv; 75 using std::add_lvalue_reference; 76 using std::add_pointer; 77 78 using std::is_array; 79 using std::is_class; 80 using std::is_const; 81 using std::is_convertible; 82 using std::is_enum; 83 using std::is_function; 84 using std::is_integral; 85 using std::is_lvalue_reference; 86 using std::is_member_function_pointer; 87 using std::is_member_pointer; 88 using std::is_pointer; 89 using std::is_polymorphic; 90 using std::is_reference; 91 using std::is_same; 92 using std::is_scalar; 93 using std::is_union; 94 using std::is_void; 95 using std::is_volatile; 96 97 using std::remove_reference; 98 using std::remove_pointer; 99 using std::remove_cv; 100 using std::remove_const; 101 102 typedef std::integral_constant<bool, true> true_; 103 typedef std::integral_constant<bool, false> false_; 104 #endif 105 using boost::is_base_and_derived; 106 using boost::type_with_alignment; 107 using boost::has_trivial_copy; 108 }}} // namespace boost::python::detail 109 110 111 #endif //BOOST_DETAIL_TYPE_TRAITS_HPP 112