diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2023-04-29 20:46:43 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2023-04-29 20:46:43 +0300 |
commit | 6b89e60fa299de624c7ac78f8356ca66682b9ddb (patch) | |
tree | 08457f5ceb0474543b2c5d84f3da2ff4fb1be418 /contrib/restricted | |
parent | 67a8e9c54fef98d657d46de9ee56a3e047e8457d (diff) | |
download | ydb-6b89e60fa299de624c7ac78f8356ca66682b9ddb.tar.gz |
Update contrib/restricted/boost/exception to 1.82.0
Diffstat (limited to 'contrib/restricted')
3 files changed, 24 insertions, 12 deletions
diff --git a/contrib/restricted/boost/exception/include/boost/exception/detail/exception_ptr.hpp b/contrib/restricted/boost/exception/include/boost/exception/detail/exception_ptr.hpp index c3b97b9c48..cdfc3bed34 100644 --- a/contrib/restricted/boost/exception/include/boost/exception/detail/exception_ptr.hpp +++ b/contrib/restricted/boost/exception/include/boost/exception/detail/exception_ptr.hpp @@ -64,8 +64,7 @@ boost inline wrap_exception_ptr( std::exception_ptr const & e ) { - exception_detail::clone_base const & base = - boost::enable_current_exception(std_exception_ptr_wrapper(std::current_exception())); + exception_detail::clone_base const & base = boost::enable_current_exception(std_exception_ptr_wrapper(e)); return shared_ptr<exception_detail::clone_base const>(base.clone()); } #endif @@ -112,14 +111,24 @@ boost } }; + namespace + exception_detail + { + template <class E> + inline + exception_ptr + copy_exception_impl( E const & e ) + { + return exception_ptr(boost::make_shared<E>(e)); + } + } + template <class E> inline exception_ptr copy_exception( E const & e ) { - E cp = e; - exception_detail::copy_boost_exception(&cp, &e); - return exception_ptr(boost::make_shared<wrapexcept<E> >(cp)); + return exception_detail::copy_exception_impl(boost::enable_current_exception(e)); } template <class T> @@ -385,6 +394,9 @@ boost { return exception_ptr(shared_ptr<exception_detail::clone_base const>(e.clone())); } + +#ifdef BOOST_NO_CXX11_HDR_EXCEPTION + catch( std::domain_error & e ) { @@ -457,19 +469,19 @@ boost { return exception_detail::current_exception_std_exception(e); } -#ifdef BOOST_NO_CXX11_HDR_EXCEPTION - // this case can be handled losslesly with std::current_exception() (see below) catch( std::exception & e ) { return exception_detail::current_exception_unknown_std_exception(e); } -#endif catch( boost::exception & e ) { return exception_detail::current_exception_unknown_boost_exception(e); } + +#endif // #ifdef BOOST_NO_CXX11_HDR_EXCEPTION + catch( ... ) { diff --git a/contrib/restricted/boost/exception/include/boost/exception/diagnostic_information.hpp b/contrib/restricted/boost/exception/include/boost/exception/diagnostic_information.hpp index b5496d32ec..145fbe5b01 100644 --- a/contrib/restricted/boost/exception/include/boost/exception/diagnostic_information.hpp +++ b/contrib/restricted/boost/exception/include/boost/exception/diagnostic_information.hpp @@ -9,7 +9,7 @@ #include <boost/config.hpp> #include <boost/exception/get_error_info.hpp> #include <boost/exception/info.hpp> -#include <boost/utility/enable_if.hpp> +#include <boost/core/enable_if.hpp> #ifndef BOOST_NO_RTTI #include <boost/core/demangle.hpp> #endif @@ -149,11 +149,11 @@ boost if( f ) { tmp << *f; - if( int const * l=get_error_info<throw_line>(*be) ) + if( l ) tmp << '(' << *l << "): "; } tmp << "Throw in function "; - if( char const * const * fn=get_error_info<throw_function>(*be) ) + if( fn ) tmp << *fn; else tmp << "(unknown)"; diff --git a/contrib/restricted/boost/exception/include/boost/exception/to_string.hpp b/contrib/restricted/boost/exception/include/boost/exception/to_string.hpp index 9a2c05794c..49f1b18d06 100644 --- a/contrib/restricted/boost/exception/include/boost/exception/to_string.hpp +++ b/contrib/restricted/boost/exception/include/boost/exception/to_string.hpp @@ -6,7 +6,7 @@ #ifndef BOOST_EXCEPTION_7E48761AD92811DC9011477D56D89593 #define BOOST_EXCEPTION_7E48761AD92811DC9011477D56D89593 -#include <boost/utility/enable_if.hpp> +#include <boost/core/enable_if.hpp> #include <boost/exception/detail/is_output_streamable.hpp> #include <sstream> |