Remove uses of BOOST_NOEXCEPT

This commit is contained in:
Peter Dimov
2024-10-02 22:13:01 +03:00
parent 950ef1c130
commit ab13ffa91d
7 changed files with 11 additions and 17 deletions

View File

@ -462,7 +462,7 @@ template<class T, class U, class A>
inline typename allocator_pointer<typename allocator_rebind<A,
typename detail::sp_alloc_value<T>::type>::type>::type
get_allocator_pointer(const std::unique_ptr<T,
alloc_deleter<U, A> >& p) BOOST_NOEXCEPT
alloc_deleter<U, A> >& p) noexcept
{
return p.get().ptr();
}

View File

@ -96,7 +96,7 @@ template< class D > struct sp_convert_reference< D& >
typedef sp_reference_wrapper< D > type;
};
template<class T> std::size_t sp_hash_pointer( T* p ) BOOST_NOEXCEPT
template<class T> std::size_t sp_hash_pointer( T* p ) noexcept
{
boost::uintptr_t v = reinterpret_cast<boost::uintptr_t>( p );

View File

@ -16,7 +16,6 @@
//
#include <boost/smart_ptr/detail/yield_k.hpp>
#include <boost/config.hpp>
#include <atomic>
#if defined(BOOST_SP_REPORT_IMPLEMENTATION)
@ -40,12 +39,12 @@ public:
public:
bool try_lock() BOOST_NOEXCEPT
bool try_lock() noexcept
{
return !v_.test_and_set( std::memory_order_acquire );
}
void lock() BOOST_NOEXCEPT
void lock() noexcept
{
for( unsigned k = 0; !try_lock(); ++k )
{
@ -53,7 +52,7 @@ public:
}
}
void unlock() BOOST_NOEXCEPT
void unlock() noexcept
{
v_ .clear( std::memory_order_release );
}
@ -71,12 +70,12 @@ public:
public:
explicit scoped_lock( spinlock & sp ) BOOST_NOEXCEPT: sp_( sp )
explicit scoped_lock( spinlock & sp ) noexcept: sp_( sp )
{
sp.lock();
}
~scoped_lock() /*BOOST_NOEXCEPT*/
~scoped_lock() /*noexcept*/
{
sp_.unlock();
}

View File

@ -5,8 +5,6 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
namespace boost
{
@ -16,7 +14,7 @@ template<class T = void> struct owner_equal_to
typedef T first_argument_type;
typedef T second_argument_type;
template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
template<class U, class V> bool operator()( U const & u, V const & v ) const noexcept
{
return u.owner_equals( v );
}

View File

@ -5,7 +5,6 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#include <boost/config.hpp>
#include <cstddef>
namespace boost
@ -16,7 +15,7 @@ template<class T> struct owner_hash
typedef std::size_t result_type;
typedef T argument_type;
std::size_t operator()( T const & t ) const BOOST_NOEXCEPT
std::size_t operator()( T const & t ) const noexcept
{
return t.owner_hash_value();
}

View File

@ -14,8 +14,6 @@
// See http://www.boost.org/libs/smart_ptr/ for documentation.
//
#include <boost/config.hpp>
namespace boost
{
@ -25,7 +23,7 @@ template<class T = void> struct owner_less
typedef T first_argument_type;
typedef T second_argument_type;
template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
template<class U, class V> bool operator()( U const & u, V const & v ) const noexcept
{
return u.owner_before( v );
}

View File

@ -42,7 +42,7 @@ struct X: public boost::enable_shared_from_this<X>
{
int v_;
constexpr X() BOOST_NOEXCEPT: v_( 1 )
constexpr X() noexcept: v_( 1 )
{
}
};