From 93692697ef2ffd1640eead54b2501fac927f776d Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Sun, 9 Feb 2020 16:52:49 -0800 Subject: [PATCH] Fixing MSVC-11 compilation error, thanks Lastique --- include/boost/exception/detail/exception_ptr.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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(