diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 72f39ce..ce0523b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -39,3 +39,4 @@ run throw_exception_nx_test.cpp : : : off ; run throw_exception_nx_test2.cpp : : : off ; run make_exception_ptr_test.cpp ; +run make_exception_ptr_test2.cpp ; diff --git a/test/make_exception_ptr_test2.cpp b/test/make_exception_ptr_test2.cpp new file mode 100644 index 0000000..86cf5a4 --- /dev/null +++ b/test/make_exception_ptr_test2.cpp @@ -0,0 +1,20 @@ +// Copyright 2020 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// http://www.boost.org/LICENSE_1_0.txt + +#if defined(_MSC_VER) +# pragma warning(disable: 4702) // unreachable code +#endif + +#define BOOST_EXCEPTION_DISABLE + +#include +#include + +class my_exception: public std::exception {}; + +int main() +{ + BOOST_TEST_THROWS( boost::rethrow_exception( boost::make_exception_ptr( my_exception() ) ), my_exception ); + return boost::report_errors(); +}