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/config.hpp>
7 
8 #if defined(RETURN_FUNCTION_DYN_LINK)
9 # define EXPORT BOOST_SYMBOL_EXPORT
10 #else
11 # define EXPORT
12 #endif
13 
f(int x,int y)14 int f( int x, int y )
15 {
16     return x + y;
17 }
18 
get_fn_1()19 EXPORT boost::function<int(int, int)> get_fn_1()
20 {
21     return f;
22 }
23 
get_fn_2()24 EXPORT boost::function2<int, int, int> get_fn_2()
25 {
26     return f;
27 }
28