Make clone_impl::rethrow use boost::throw_exception when exceptions are disabled

This commit is contained in:
Peter Dimov
2021-09-30 21:24:13 +03:00
parent 1d555aff4b
commit 9ca27bddfc

View File

@ -7,6 +7,7 @@
#define BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593 #define BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593
#include <boost/config.hpp> #include <boost/config.hpp>
#include <exception>
#ifdef BOOST_EXCEPTION_MINI_BOOST #ifdef BOOST_EXCEPTION_MINI_BOOST
#include <memory> #include <memory>
@ -390,6 +391,9 @@ boost
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#if defined(BOOST_NO_EXCEPTIONS)
BOOST_NORETURN void throw_exception(std::exception const & e); // user defined
#endif
namespace namespace
exception_detail exception_detail
@ -466,7 +470,11 @@ boost
void void
rethrow() const rethrow() const
{ {
#if defined(BOOST_NO_EXCEPTIONS)
boost::throw_exception(*this);
#else
throw*this; throw*this;
#endif
} }
}; };
} }