Remove uses of BOOST_SP_NOEXCEPT from enable_shared_from_this.hpp

This commit is contained in:
Peter Dimov
2024-10-02 21:26:52 +03:00
parent 78057574cf
commit 96ef19e72d

View File

@ -15,7 +15,6 @@
#include <boost/smart_ptr/weak_ptr.hpp>
#include <boost/smart_ptr/shared_ptr.hpp>
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/assert.hpp>
#include <boost/config.hpp>
@ -26,20 +25,20 @@ template<class T> 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<T> newer throws, so this call also must not throw
~enable_shared_from_this() noexcept // ~weak_ptr<T> newer throws, so this call also must not throw
{
}
@ -59,12 +58,12 @@ public:
return p;
}
weak_ptr<T> weak_from_this() BOOST_SP_NOEXCEPT
weak_ptr<T> weak_from_this() noexcept
{
return weak_this_;
}
weak_ptr<T const> weak_from_this() const BOOST_SP_NOEXCEPT
weak_ptr<T const> 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<class X, class Y> void _internal_accept_owner( shared_ptr<X> const * ppx, Y * py ) const BOOST_SP_NOEXCEPT
template<class X, class Y> void _internal_accept_owner( shared_ptr<X> const * ppx, Y * py ) const noexcept
{
if( weak_this_.expired() )
{