1 2 // (C) Copyright Edward Diener 2011 3 // Use, modification and distribution are subject to the Boost Software License, 4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt). 6 7 #include "test_has_mem_fun.hpp" 8 #include <boost/detail/lightweight_test.hpp> 9 main()10int main() 11 { 12 13 BOOST_TEST((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(VoidFunction)<void (AType::*)()>::value)); 14 BOOST_TEST(FunctionReturningInt<int (AType::*)()>::value); 15 BOOST_TEST(FunctionReturningInt<double (AnotherType::*)(int)>::value); 16 BOOST_TEST(BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(aFunction)<AType (AnotherType::*)(int)>::value); 17 BOOST_TEST(AnotherIntFunction<int (AnotherType::*)(AType)>::value); 18 BOOST_TEST(BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(sFunction)<AType::AnIntType (AnotherType::*)(int,long,double)>::value); 19 BOOST_TEST(!BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(someFunctionMember)<AType (AnotherType::*)(long,int)>::value); 20 21 return boost::report_errors(); 22 23 } 24