1// Copyright 2020 Peter Dimov
2// Distributed under the Boost Software License, Version 1.0.
3// http://www.boost.org/LICENSE_1_0.txt
4
5#if defined(_MSC_VER)
6# pragma warning(disable: 4702) // unreachable code
7#endif
8
9#include <boost/exception_ptr.hpp>
10#include <boost/core/lightweight_test.hpp>
11
12class my_exception: public std::exception {};
13
14int main()
15{
16 BOOST_TEST_THROWS( boost::rethrow_exception( boost::make_exception_ptr( my_exception() ) ), my_exception );
17 return boost::report_errors();
18}
19

source code of boost/libs/throw_exception/test/make_exception_ptr_test.cpp