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#define BOOST_EXCEPTION_DISABLE
10
11#include <boost/exception_ptr.hpp>
12#include <boost/core/lightweight_test.hpp>
13
14class my_exception: public std::exception {};
15
16int main()
17{
18 BOOST_TEST_THROWS( boost::rethrow_exception( boost::make_exception_ptr( my_exception() ) ), my_exception );
19 return boost::report_errors();
20}
21

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