// (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifdef TEST_STD_HEADERS #include #else #include #endif #include #include struct int_result_type { typedef int result_type; }; struct int_result_of { template struct result { typedef int type; }; }; struct int_result_type_and_float_result_of { typedef int result_type; template struct result { typedef float type; }; }; struct X {}; int main() { typedef int (*func_ptr)(float, double); typedef int (&func_ref)(float, double); typedef int (X::*mem_func_ptr)(float); typedef int (X::*mem_func_ptr_c)(float) const; typedef int (X::*mem_func_ptr_v)(float) volatile; typedef int (X::*mem_func_ptr_cv)(float) const volatile; BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, void>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, void>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); BOOST_STATIC_ASSERT((::boost::is_same< ::std::tr1::result_of::type, int>::value)); return 0; }