1 // Copyright 2019 Peter Dimov
2 
3 // Use, modification and distribution is subject to the Boost Software License, Version 1.0.
4 // See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
5 
6 #include <boost/function.hpp>
7 #include <boost/core/lightweight_test.hpp>
8 
f(int x)9 static int f( int x )
10 {
11     return x + 1;
12 }
13 
main()14 int main()
15 {
16     boost::function<int(int)> fn( f );
17 
18     BOOST_TEST_EQ( fn( 5 ), 6 );
19 
20     return boost::report_errors();
21 }
22