// Copyright David Abrahams 2004. 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) //#include #define BOOST_ENABLE_ASSERT_HANDLER #include #include #include #include //#define print(expr) printf("%s ==> %s\n", #expr, expr) // not all the compilers can handle an incomplete class type here. struct X {}; using namespace boost::python::indirect_traits; typedef void (X::*pmf)(); BOOST_MPL_ASSERT((is_reference_to_function)); BOOST_MPL_ASSERT_NOT((is_reference_to_function)); BOOST_MPL_ASSERT_NOT((is_reference_to_function)); BOOST_MPL_ASSERT_NOT((is_reference_to_function)); BOOST_MPL_ASSERT_NOT((is_pointer_to_function)); BOOST_MPL_ASSERT((is_pointer_to_function)); BOOST_MPL_ASSERT_NOT((is_pointer_to_function)); BOOST_MPL_ASSERT_NOT((is_pointer_to_function)); BOOST_MPL_ASSERT_NOT((is_pointer_to_function)); BOOST_MPL_ASSERT_NOT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_function_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT((is_reference_to_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_pointer)); BOOST_MPL_ASSERT_NOT((is_reference_to_const)); BOOST_MPL_ASSERT((is_reference_to_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_const)); BOOST_MPL_ASSERT((is_reference_to_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_const)); BOOST_MPL_ASSERT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_non_const)); BOOST_MPL_ASSERT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_non_const)); BOOST_MPL_ASSERT_NOT((is_reference_to_volatile)); BOOST_MPL_ASSERT_NOT((is_reference_to_volatile)); BOOST_MPL_ASSERT((is_reference_to_volatile)); BOOST_MPL_ASSERT((is_reference_to_volatile)); BOOST_MPL_ASSERT_NOT((is_reference_to_volatile)); BOOST_MPL_ASSERT_NOT((is_reference_to_volatile)); BOOST_MPL_ASSERT_NOT((is_reference_to_volatile)); namespace tt = boost::python::indirect_traits; BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_class)); BOOST_MPL_ASSERT((tt::is_reference_to_class)); BOOST_MPL_ASSERT((tt::is_reference_to_class)); BOOST_MPL_ASSERT((tt::is_reference_to_class)); BOOST_MPL_ASSERT((tt::is_reference_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT_NOT((is_pointer_to_class)); BOOST_MPL_ASSERT((is_pointer_to_class)); BOOST_MPL_ASSERT((is_pointer_to_class)); BOOST_MPL_ASSERT((is_pointer_to_class)); BOOST_MPL_ASSERT((is_pointer_to_class)); BOOST_MPL_ASSERT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_member_function_pointer)); BOOST_MPL_ASSERT_NOT((tt::is_reference_to_member_function_pointer));