1 // Boost.Function library
3 // Copyright 2016 Peter Dimov
5 // Use, modification and distribution is subject to
6 // the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
10 #include <boost/function.hpp>
11 #include <boost/core/is_same.hpp>
12 #include <boost/core/lightweight_test_trait.hpp>
28 typedef boost::function<X(Y)> F1;
30 BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::result_type, X> ));
31 BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F1::argument_type, Y> ));
33 typedef boost::function<X(Y, Z)> F2;
35 BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::result_type, X> ));
36 BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::first_argument_type, Y> ));
37 BOOST_TEST_TRAIT_TRUE(( boost::core::is_same<F2::second_argument_type, Z> ));
39 return boost::report_errors();