summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/function/test/return_function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/libs/function/test/return_function.cpp')
-rw-r--r--src/boost/libs/function/test/return_function.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/boost/libs/function/test/return_function.cpp b/src/boost/libs/function/test/return_function.cpp
new file mode 100644
index 000000000..3fca7bbd7
--- /dev/null
+++ b/src/boost/libs/function/test/return_function.cpp
@@ -0,0 +1,27 @@
+
+// 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;
+}