File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,8 @@ run nothrow_swap.cpp ;
36
36
run rvalues_test.cpp ;
37
37
compile function_typeof_test.cpp ;
38
38
run result_arg_types_test.cpp ;
39
+
40
+ lib throw_bad_function_call : throw_bad_function_call.cpp : <link>shared:<define>THROW_BAD_FUNCTION_CALL_DYN_LINK=1 ;
41
+
42
+ run test_bad_function_call.cpp throw_bad_function_call : : : <link>shared : test_bad_function_call_shared ;
43
+ run test_bad_function_call.cpp throw_bad_function_call : : : <link>static : test_bad_function_call_static ;
Original file line number Diff line number Diff line change
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
+ void throw_bad_function_call ();
9
+
10
+ int main ()
11
+ {
12
+ BOOST_TEST_THROWS ( throw_bad_function_call (), boost::bad_function_call );
13
+ return boost::report_errors ();
14
+ }
Original file line number Diff line number Diff line change
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(THROW_BAD_FUNCTION_CALL_DYN_LINK)
9
+ # define EXPORT BOOST_SYMBOL_EXPORT
10
+ #else
11
+ # define EXPORT
12
+ #endif
13
+
14
+ EXPORT void throw_bad_function_call ()
15
+ {
16
+ throw boost::bad_function_call ();
17
+ }
You can’t perform that action at this time.
0 commit comments