diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index bb79a37..86dbcce 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -23,6 +23,11 @@ #ifdef BOOST_NO_EXCEPTIONS # include +#else +# ifndef BOOST_EXCEPTION_DISABLE +# include +# include +# endif #endif namespace boost @@ -36,7 +41,11 @@ void throw_exception(std::exception const & e); // user defined template inline void throw_exception(E const & e) { +#ifndef BOOST_EXCEPTION_DISABLE + throw enable_current_exception(enable_error_info(e)); +#else throw e; +#endif } #endif