diff --git a/test/function_ptr.cpp b/test/function_ptr.cpp index 2e08a15..be08c11 100755 --- a/test/function_ptr.cpp +++ b/test/function_ptr.cpp @@ -4,3 +4,12 @@ BOOST_STATIC_ASSERT(boost::type_of::test::value); BOOST_STATIC_ASSERT(boost::type_of::test::value); BOOST_STATIC_ASSERT(boost::type_of::test::value); BOOST_STATIC_ASSERT(boost::type_of::test::value); + +// check that const gets stripped from function pointer + +int foo(double); +typedef int(*PTR)(double); +typedef const PTR CPTR; +CPTR cptr = foo; + +BOOST_STATIC_ASSERT((boost::is_same::value)); diff --git a/test/function_ref.cpp b/test/function_ref.cpp index bc9f6ec..560ef53 100755 --- a/test/function_ref.cpp +++ b/test/function_ref.cpp @@ -2,3 +2,11 @@ BOOST_STATIC_ASSERT(boost::type_of::test::value); BOOST_STATIC_ASSERT(boost::type_of::test::value); + +// check that function values/refs can be bound + +int foo(double); +typedef int(&FREF)(double); +FREF fref = *foo; + +BOOST_STATIC_ASSERT((boost::is_same::value)); diff --git a/test/nested_typedef.cpp b/test/nested_typedef.cpp index d1bb3e4..129307e 100644 --- a/test/nested_typedef.cpp +++ b/test/nested_typedef.cpp @@ -8,7 +8,7 @@ void do_int(int) {} struct { template - T operator[](const T&) {} + T operator[](const T& n) {return n;} } int_p;