diff --git a/include/boost/exception/detail/exception_ptr.hpp b/include/boost/exception/detail/exception_ptr.hpp index fe8a06c..26b365a 100644 --- a/include/boost/exception/detail/exception_ptr.hpp +++ b/include/boost/exception/detail/exception_ptr.hpp @@ -304,6 +304,16 @@ boost std_exception_ptr_wrapper { std::exception_ptr p; + explicit std_exception_ptr_wrapper( std::exception_ptr const & ptr ) BOOST_NOEXCEPT: + p(ptr) + { + } +#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES + explicit std_exception_ptr_wrapper( std::exception_ptr && ptr ) BOOST_NOEXCEPT: + p(static_cast(ptr)) + { + } +#endif }; #endif @@ -441,7 +451,7 @@ boost { // wrap the std::exception_ptr in a clone-enabled Boost.Exception object exception_detail::clone_base const & base = - boost::enable_current_exception(std_exception_ptr_wrapper{std::current_exception()}); + boost::enable_current_exception(std_exception_ptr_wrapper(std::current_exception())); return exception_ptr(shared_ptr(base.clone())); } catch(