diff --git a/tests/is_function_test.cpp b/tests/is_function_test.cpp index 39094a6..672ac04 100644 --- a/tests/is_function_test.cpp +++ b/tests/is_function_test.cpp @@ -17,25 +17,11 @@ struct is_function_tester template void is_function_tester::check() { - if(false == ::boost::is_function::value) - { - // if we're not a function then we must be a - // function pointer: - value_test(false, ::boost::is_function::value); -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - value_test(true, ::boost::is_pointer::value); -#endif - } - else - { - // if we're a function then we must not be a - // function pointer: - value_test(true, ::boost::is_function::value); -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - value_test(false, ::boost::is_pointer::value); -#endif - } + // if we're a function then we must not be a + // function pointer: + value_test(true, ::boost::is_function::value); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + value_test(false, ::boost::is_pointer::value); value_test(false, ::boost::is_void::value); value_test(false, ::boost::is_integral::value); value_test(false, ::boost::is_float::value); @@ -58,32 +44,19 @@ void is_function_tester::check() #endif } -template -void is_function_test(T*) -{ - is_function_tester::check(); -} -template -void is_function_test(T) -{ - is_function_tester::check(); -} - - -void foo0(){} -void foo1(int){} -void foo2(int&, double){} -void foo3(int&, bool, int, int){} -void foo4(int, bool, int*, int[], int, int, int, int, int){} - - int cpp_main(int argc, char* argv[]) { - is_function_test(&foo0); - is_function_test(&foo1); - is_function_test(&foo2); - is_function_test(&foo3); - is_function_test(&foo4); + typedef void foo0_t(); + typedef void foo1_t(int); + typedef void foo2_t(int&, double); + typedef void foo3_t(int&, bool, int, int); + typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int); + + is_function_tester::check(); + is_function_tester::check(); + is_function_tester::check(); + is_function_tester::check(); + is_function_tester::check(); value_test(false, ::boost::is_function::value); value_test(false, ::boost::is_function::value);