1 2 // Copyright 2018 Peter Dimov. 3 // Distributed under the Boost Software License, Version 1.0. 4 5 #include <boost/function.hpp> 6 #include <boost/core/lightweight_test.hpp> 7 8 // 9 10 boost::function<int(int, int)> get_fn_1(); 11 boost::function2<int, int, int> get_fn_2(); 12 13 // 14 main()15int main() 16 { 17 BOOST_TEST_EQ( get_fn_1()( 1, 2 ), 3 ); 18 BOOST_TEST_EQ( get_fn_2()( 1, 2 ), 3 ); 19 20 return boost::report_errors(); 21 } 22