From 96ef19e72dbd2e5c993d557470efbbedd7cc9e69 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 2 Oct 2024 21:26:52 +0300 Subject: [PATCH] Remove uses of BOOST_SP_NOEXCEPT from enable_shared_from_this.hpp --- .../boost/smart_ptr/enable_shared_from_this.hpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/boost/smart_ptr/enable_shared_from_this.hpp b/include/boost/smart_ptr/enable_shared_from_this.hpp index fc4de0b..292e62e 100644 --- a/include/boost/smart_ptr/enable_shared_from_this.hpp +++ b/include/boost/smart_ptr/enable_shared_from_this.hpp @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -26,20 +25,20 @@ template class enable_shared_from_this { protected: - BOOST_CONSTEXPR enable_shared_from_this() BOOST_SP_NOEXCEPT + BOOST_CONSTEXPR enable_shared_from_this() noexcept { } - BOOST_CONSTEXPR enable_shared_from_this(enable_shared_from_this const &) BOOST_SP_NOEXCEPT + BOOST_CONSTEXPR enable_shared_from_this(enable_shared_from_this const &) noexcept { } - enable_shared_from_this & operator=(enable_shared_from_this const &) BOOST_SP_NOEXCEPT + enable_shared_from_this & operator=(enable_shared_from_this const &) noexcept { return *this; } - ~enable_shared_from_this() BOOST_SP_NOEXCEPT // ~weak_ptr newer throws, so this call also must not throw + ~enable_shared_from_this() noexcept // ~weak_ptr newer throws, so this call also must not throw { } @@ -59,12 +58,12 @@ public: return p; } - weak_ptr weak_from_this() BOOST_SP_NOEXCEPT + weak_ptr weak_from_this() noexcept { return weak_this_; } - weak_ptr weak_from_this() const BOOST_SP_NOEXCEPT + weak_ptr weak_from_this() const noexcept { return weak_this_; } @@ -72,7 +71,7 @@ public: public: // actually private, but avoids compiler template friendship issues // Note: invoked automatically by shared_ptr; do not call - template void _internal_accept_owner( shared_ptr const * ppx, Y * py ) const BOOST_SP_NOEXCEPT + template void _internal_accept_owner( shared_ptr const * ppx, Y * py ) const noexcept { if( weak_this_.expired() ) {