// (C) Copyright John Maddock 2000. // 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 # include #else # include #endif #include "test.hpp" #include "check_type.hpp" #include "check_integral_constant.hpp" typedef void(pf_zero1)(); typedef int(pf_zero2)(); typedef const int& (pf_zero3)(); typedef void(pf_one1)(int); typedef int(pf_one2)(int); typedef const int&(pf_one3)(const int&); typedef void(pf_two1)(int,int); typedef int(pf_two2)(int,int); typedef const int&(pf_two3)(const int&,const int&); TT_TEST_BEGIN(function_traits) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 0); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 0); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 0); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 1); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 1); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 1); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 2); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 2); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::function_traits::arity, 2); BOOST_CHECK_TYPE(void, ::tt::function_traits::result_type); BOOST_CHECK_TYPE(::tt::function_traits::result_type, int); BOOST_CHECK_TYPE(::tt::function_traits::result_type, const int&); BOOST_CHECK_TYPE(::tt::function_traits::result_type, void); BOOST_CHECK_TYPE(::tt::function_traits::result_type, int); BOOST_CHECK_TYPE(::tt::function_traits::result_type, const int&); BOOST_CHECK_TYPE(::tt::function_traits::result_type, void); BOOST_CHECK_TYPE(::tt::function_traits::result_type, int); BOOST_CHECK_TYPE(::tt::function_traits::result_type, const int&); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, const int&); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg1_type, const int&); BOOST_CHECK_TYPE(::tt::function_traits::arg2_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg2_type, int); BOOST_CHECK_TYPE(::tt::function_traits::arg2_type, const int&); TT_TEST_END