#include #include #include #include class int_result_type { typedef int result_type; }; class int_result_of { template struct result_of { typedef int type; }; }; class int_result_type_and_float_result_of { typedef int result_type; template struct result_of { typedef float type; }; }; struct X {}; int main() { using namespace boost; typedef int (*func_ptr)(float, double); typedef int (X::*mem_func_ptr)(float); BOOST_STATIC_ASSERT((is_same::type, int>::value)); BOOST_STATIC_ASSERT((is_same::type, int>::value)); BOOST_STATIC_ASSERT((is_same::type, int>::value)); BOOST_STATIC_ASSERT((is_same::type, int>::value)); BOOST_STATIC_ASSERT((is_same::type, int>::value)); return 0; }