/////////////////////////////////////////////////////////////////////////////// // test_is_callable_with_args.cpp // Some simple test cases for the is_callable_with_args function trait. // // Copyright 2009 Eric Niebler. Distributed under 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) #include "is_callable_with_args.hpp" #include struct X { bool operator()(int, char const *) const { return false; } }; void test_is_callable_with_args() { BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); typedef void fun(int, char const *); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT_NOT((boost::function_types::is_callable_with_args)); typedef void varargfun(...); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); BOOST_MPL_ASSERT((boost::function_types::is_callable_with_args)); }