]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // Copyright (C) 2006 Arkadiy Vertleyb |
2 | // Use, modification and distribution is subject to the Boost Software | |
3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) | |
4 | ||
5 | #include "test.hpp" | |
6 | ||
7 | BOOST_STATIC_ASSERT(boost::type_of::test<double(*)()>::value); | |
8 | BOOST_STATIC_ASSERT(boost::type_of::test<double(*)(int, double, short, char*, bool, char, float, long, unsigned short)>::value); | |
9 | BOOST_STATIC_ASSERT(boost::type_of::test<void(*)()>::value); | |
10 | BOOST_STATIC_ASSERT(boost::type_of::test<void(*)(int, double, short, char*, bool, char, float, long, unsigned short)>::value); | |
11 | ||
12 | // check that const gets stripped from function pointer | |
13 | ||
14 | int foo(double); | |
15 | typedef int(*PTR)(double); | |
16 | typedef const PTR CPTR; | |
17 | CPTR cptr = foo; | |
18 | ||
19 | BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(cptr), PTR>::value)); |