mirror of
https://github.com/boostorg/typeof.git
synced 2025-07-29 20:37:28 +02:00
*** empty log message ***
[SVN r34269]
This commit is contained in:
@ -50,6 +50,9 @@ test-suite "typeof"
|
||||
[ compile function.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_native ]
|
||||
[ compile function.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_emulation ]
|
||||
|
||||
[ compile function_binding.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_binding_native ]
|
||||
[ compile function_binding.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_binding_emulation ]
|
||||
|
||||
[ compile function_ptr.cpp : <define>BOOST_TYPEOF_NATIVE special-requirements : function_ptr_native ]
|
||||
[ compile function_ptr.cpp : <define>BOOST_TYPEOF_COMPLIANT special-requirements : function_ptr_emulation ]
|
||||
|
||||
|
10
test/function_binding.cpp
Executable file
10
test/function_binding.cpp
Executable file
@ -0,0 +1,10 @@
|
||||
#include <boost/typeof/typeof.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
int foo(double);
|
||||
typedef int(&FREF)(double);
|
||||
FREF fref = *foo;
|
||||
|
||||
BOOST_STATIC_ASSERT((boost::is_same<BOOST_TYPEOF(fref), int(double)>::value));
|
@ -2,11 +2,3 @@
|
||||
|
||||
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));
|
||||
|
Reference in New Issue
Block a user