2
0
mirror of https://github.com/boostorg/typeof.git synced 2026-01-22 17:52:22 +00:00
Files
typeof/test/function_ref.cpp
Arkadiy Vertleyb a8112fe31d function binding
[SVN r34175]
2006-06-05 02:32:41 +00:00

13 lines
345 B
C++
Executable File

#include "test.hpp"
BOOST_STATIC_ASSERT(boost::type_of::test<void(&)()>::value);
BOOST_STATIC_ASSERT(boost::type_of::test<int(&)(int, short)>::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<BOOST_TYPEOF(fref), int(double)>::value));