Skip to content

Commit 39974c5

Browse files
committed
Remove uses of BOOST_SP_NOEXCEPT from sp_counted_base_std_atomic.hpp
1 parent 371d4bf commit 39974c5

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

include/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// http://www.boost.org/LICENSE_1_0.txt
1717

1818
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
19-
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
2019
#include <boost/config.hpp>
2120
#include <atomic>
2221
#include <cstdint>
@@ -34,17 +33,17 @@ namespace boost
3433
namespace detail
3534
{
3635

37-
inline void atomic_increment( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
36+
inline void atomic_increment( std::atomic_int_least32_t * pw ) noexcept
3837
{
3938
pw->fetch_add( 1, std::memory_order_relaxed );
4039
}
4140

42-
inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
41+
inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw ) noexcept
4342
{
4443
return pw->fetch_sub( 1, std::memory_order_acq_rel );
4544
}
4645

47-
inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) BOOST_SP_NOEXCEPT
46+
inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw ) noexcept
4847
{
4948
// long r = *pw;
5049
// if( r != 0 ) ++*pw;
@@ -78,41 +77,41 @@ class BOOST_SYMBOL_VISIBLE sp_counted_base
7877

7978
public:
8079

81-
sp_counted_base() BOOST_SP_NOEXCEPT: use_count_( 1 ), weak_count_( 1 )
80+
sp_counted_base() noexcept: use_count_( 1 ), weak_count_( 1 )
8281
{
8382
}
8483

85-
virtual ~sp_counted_base() /*BOOST_SP_NOEXCEPT*/
84+
virtual ~sp_counted_base() /*noexcept*/
8685
{
8786
}
8887

8988
// dispose() is called when use_count_ drops to zero, to release
9089
// the resources managed by *this.
9190

92-
virtual void dispose() BOOST_SP_NOEXCEPT = 0;
91+
virtual void dispose() noexcept = 0;
9392

9493
// destroy() is called when weak_count_ drops to zero.
9594

96-
virtual void destroy() BOOST_SP_NOEXCEPT
95+
virtual void destroy() noexcept
9796
{
9897
delete this;
9998
}
10099

101-
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
102-
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
103-
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
100+
virtual void * get_deleter( sp_typeinfo_ const & ti ) noexcept = 0;
101+
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) noexcept = 0;
102+
virtual void * get_untyped_deleter() noexcept = 0;
104103

105-
void add_ref_copy() BOOST_SP_NOEXCEPT
104+
void add_ref_copy() noexcept
106105
{
107106
atomic_increment( &use_count_ );
108107
}
109108

110-
bool add_ref_lock() BOOST_SP_NOEXCEPT // true on success
109+
bool add_ref_lock() noexcept // true on success
111110
{
112111
return atomic_conditional_increment( &use_count_ ) != 0;
113112
}
114113

115-
void release() BOOST_SP_NOEXCEPT
114+
void release() noexcept
116115
{
117116
if( atomic_decrement( &use_count_ ) == 1 )
118117
{
@@ -121,20 +120,20 @@ class BOOST_SYMBOL_VISIBLE sp_counted_base
121120
}
122121
}
123122

124-
void weak_add_ref() BOOST_SP_NOEXCEPT
123+
void weak_add_ref() noexcept
125124
{
126125
atomic_increment( &weak_count_ );
127126
}
128127

129-
void weak_release() BOOST_SP_NOEXCEPT
128+
void weak_release() noexcept
130129
{
131130
if( atomic_decrement( &weak_count_ ) == 1 )
132131
{
133132
destroy();
134133
}
135134
}
136135

137-
long use_count() const BOOST_SP_NOEXCEPT
136+
long use_count() const noexcept
138137
{
139138
return use_count_.load( std::memory_order_acquire );
140139
}

0 commit comments

Comments
 (0)