From 9ca27bddfcc2741b96a083889797786d3f2014e8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 30 Sep 2021 21:24:13 +0300 Subject: [PATCH] Make clone_impl::rethrow use boost::throw_exception when exceptions are disabled --- include/boost/exception/exception.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/exception/exception.hpp b/include/boost/exception/exception.hpp index 37a582c..4c768ee 100644 --- a/include/boost/exception/exception.hpp +++ b/include/boost/exception/exception.hpp @@ -7,6 +7,7 @@ #define BOOST_EXCEPTION_274DA366004E11DCB1DDFE2E56D89593 #include +#include #ifdef BOOST_EXCEPTION_MINI_BOOST #include @@ -390,6 +391,9 @@ boost } //////////////////////////////////////////////////////////////////////// +#if defined(BOOST_NO_EXCEPTIONS) + BOOST_NORETURN void throw_exception(std::exception const & e); // user defined +#endif namespace exception_detail @@ -466,7 +470,11 @@ boost void rethrow() const { +#if defined(BOOST_NO_EXCEPTIONS) + boost::throw_exception(*this); +#else throw*this; +#endif } }; }