1 #include <luabind/detail/typetraits.hpp>
2 #include <boost/static_assert.hpp>
4 using namespace luabind::detail
;
8 void test_type_traits()
10 BOOST_STATIC_ASSERT(is_nonconst_reference
<int&>::value
);
11 BOOST_STATIC_ASSERT(!is_nonconst_reference
<const int&>::value
);
12 BOOST_STATIC_ASSERT(is_nonconst_reference
<tester
&>::value
);
13 BOOST_STATIC_ASSERT(!is_nonconst_reference
<const tester
&>::value
);
15 BOOST_STATIC_ASSERT(!is_const_reference
<int&>::value
);
16 BOOST_STATIC_ASSERT(is_const_reference
<const int&>::value
);
17 BOOST_STATIC_ASSERT(!is_const_reference
<tester
&>::value
);
18 BOOST_STATIC_ASSERT(is_const_reference
<const tester
&>::value
);
20 BOOST_STATIC_ASSERT(!is_const_pointer
<int*>::value
);
21 BOOST_STATIC_ASSERT(is_const_pointer
<const int*>::value
);
22 BOOST_STATIC_ASSERT(!is_const_pointer
<tester
*>::value
);
23 BOOST_STATIC_ASSERT(is_const_pointer
<const tester
*>::value
);
25 BOOST_STATIC_ASSERT(is_nonconst_pointer
<int*>::value
);
26 BOOST_STATIC_ASSERT(!is_nonconst_pointer
<const int*>::value
);
27 BOOST_STATIC_ASSERT(is_nonconst_pointer
<tester
*>::value
);
28 BOOST_STATIC_ASSERT(!is_nonconst_pointer
<const tester
*>::value
);
30 BOOST_STATIC_ASSERT(!is_const_reference
<const tester
>::value
);