2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-23 17:52:17 +00:00

This commit was manufactured by cvs2svn to create branch 'mpl_v2'.

[SVN r14323]
This commit is contained in:
nobody
2002-07-07 15:55:19 +00:00
parent 37270cb809
commit 40e6b73721
48 changed files with 6193 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
//#include <stdio.h>
#include <cassert>
#include <boost/python/detail/indirect_traits.hpp>
//#define print(expr) printf("%s ==> %s\n", #expr, expr)
// not all the compilers can handle an incomplete class type here.
struct X {};
int main()
{
using namespace boost::python::detail;
#if 0 // not yet supported
assert(is_reference_to_function<int (&)()>::value);
assert(!is_reference_to_function<int (*)()>::value);
#endif
assert(!is_pointer_to_function<int (&)()>::value);
assert(is_pointer_to_function<int (*)()>::value);
assert(is_reference_to_pointer<int*&>::value);
assert(is_reference_to_pointer<int* const&>::value);
assert(is_reference_to_pointer<int*volatile&>::value);
assert(is_reference_to_pointer<int*const volatile&>::value);
assert(!is_reference_to_pointer<int const volatile>::value);
assert(!is_reference_to_pointer<int>::value);
assert(!is_reference_to_pointer<int*>::value);
assert(!is_reference_to_const<int*&>::value);
assert(is_reference_to_const<int* const&>::value);
assert(!is_reference_to_const<int*volatile&>::value);
assert(is_reference_to_const<int*const volatile&>::value);
assert(!is_reference_to_const<int const volatile>::value);
assert(!is_reference_to_const<int>::value);
assert(!is_reference_to_const<int*>::value);
assert(is_reference_to_non_const<int*&>::value);
assert(!is_reference_to_non_const<int* const&>::value);
assert(is_reference_to_non_const<int*volatile&>::value);
assert(!is_reference_to_non_const<int*const volatile&>::value);
assert(!is_reference_to_non_const<int const volatile>::value);
assert(!is_reference_to_non_const<int>::value);
assert(!is_reference_to_non_const<int*>::value);
assert(!is_reference_to_volatile<int*&>::value);
assert(!is_reference_to_volatile<int* const&>::value);
assert(is_reference_to_volatile<int*volatile&>::value);
assert(is_reference_to_volatile<int*const volatile&>::value);
assert(!is_reference_to_volatile<int const volatile>::value);
assert(!is_reference_to_volatile<int>::value);
assert(!is_reference_to_volatile<int*>::value);
assert(!is_reference_to_class<int>::value);
assert(!is_reference_to_class<int&>::value);
assert(!is_reference_to_class<int*>::value);
assert(!is_reference_to_class<X>::value);
assert(is_reference_to_class<X&>::value);
assert(is_reference_to_class<X const&>::value);
assert(is_reference_to_class<X volatile&>::value);
assert(is_reference_to_class<X const volatile&>::value);
assert(!is_pointer_to_class<int>::value);
assert(!is_pointer_to_class<int*>::value);
assert(!is_pointer_to_class<int&>::value);
assert(!is_pointer_to_class<X>::value);
assert(!is_pointer_to_class<X&>::value);
assert(is_pointer_to_class<X*>::value);
assert(is_pointer_to_class<X const*>::value);
assert(is_pointer_to_class<X volatile*>::value);
assert(is_pointer_to_class<X const volatile*>::value);
return 0;
}