mirror of
https://github.com/boostorg/function.git
synced 2025-06-27 04:51:34 +02:00
28 lines
439 B
C++
28 lines
439 B
C++
![]() |
|
||
|
// Copyright 2018 Peter Dimov.
|
||
|
// Distributed under the Boost Software License, Version 1.0.
|
||
|
|
||
|
#include <boost/function.hpp>
|
||
|
#include <boost/config.hpp>
|
||
|
|
||
|
#if defined(RETURN_FUNCTION_DYN_LINK)
|
||
|
# define EXPORT BOOST_SYMBOL_EXPORT
|
||
|
#else
|
||
|
# define EXPORT
|
||
|
#endif
|
||
|
|
||
|
int f( int x, int y )
|
||
|
{
|
||
|
return x + y;
|
||
|
}
|
||
|
|
||
|
EXPORT boost::function<int(int, int)> get_fn_1()
|
||
|
{
|
||
|
return f;
|
||
|
}
|
||
|
|
||
|
EXPORT boost::function2<int, int, int> get_fn_2()
|
||
|
{
|
||
|
return f;
|
||
|
}
|