Skip to content

Commit ab13ffa

Browse files
committed
Remove uses of BOOST_NOEXCEPT
1 parent 950ef1c commit ab13ffa

File tree

7 files changed

+11
-17
lines changed

7 files changed

+11
-17
lines changed

include/boost/smart_ptr/allocate_unique.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ template<class T, class U, class A>
462462
inline typename allocator_pointer<typename allocator_rebind<A,
463463
typename detail::sp_alloc_value<T>::type>::type>::type
464464
get_allocator_pointer(const std::unique_ptr<T,
465-
alloc_deleter<U, A> >& p) BOOST_NOEXCEPT
465+
alloc_deleter<U, A> >& p) noexcept
466466
{
467467
return p.get().ptr();
468468
}

include/boost/smart_ptr/detail/shared_count.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ template< class D > struct sp_convert_reference< D& >
9696
typedef sp_reference_wrapper< D > type;
9797
};
9898

99-
template<class T> std::size_t sp_hash_pointer( T* p ) BOOST_NOEXCEPT
99+
template<class T> std::size_t sp_hash_pointer( T* p ) noexcept
100100
{
101101
boost::uintptr_t v = reinterpret_cast<boost::uintptr_t>( p );
102102

include/boost/smart_ptr/detail/spinlock_std_atomic.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
//
1717

1818
#include <boost/smart_ptr/detail/yield_k.hpp>
19-
#include <boost/config.hpp>
2019
#include <atomic>
2120

2221
#if defined(BOOST_SP_REPORT_IMPLEMENTATION)
@@ -40,20 +39,20 @@ class spinlock
4039

4140
public:
4241

43-
bool try_lock() BOOST_NOEXCEPT
42+
bool try_lock() noexcept
4443
{
4544
return !v_.test_and_set( std::memory_order_acquire );
4645
}
4746

48-
void lock() BOOST_NOEXCEPT
47+
void lock() noexcept
4948
{
5049
for( unsigned k = 0; !try_lock(); ++k )
5150
{
5251
boost::detail::yield( k );
5352
}
5453
}
5554

56-
void unlock() BOOST_NOEXCEPT
55+
void unlock() noexcept
5756
{
5857
v_ .clear( std::memory_order_release );
5958
}
@@ -71,12 +70,12 @@ class spinlock
7170

7271
public:
7372

74-
explicit scoped_lock( spinlock & sp ) BOOST_NOEXCEPT: sp_( sp )
73+
explicit scoped_lock( spinlock & sp ) noexcept: sp_( sp )
7574
{
7675
sp.lock();
7776
}
7877

79-
~scoped_lock() /*BOOST_NOEXCEPT*/
78+
~scoped_lock() /*noexcept*/
8079
{
8180
sp_.unlock();
8281
}

include/boost/smart_ptr/owner_equal_to.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// Distributed under the Boost Software License, Version 1.0.
66
// https://www.boost.org/LICENSE_1_0.txt
77

8-
#include <boost/config.hpp>
9-
108
namespace boost
119
{
1210

@@ -16,7 +14,7 @@ template<class T = void> struct owner_equal_to
1614
typedef T first_argument_type;
1715
typedef T second_argument_type;
1816

19-
template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
17+
template<class U, class V> bool operator()( U const & u, V const & v ) const noexcept
2018
{
2119
return u.owner_equals( v );
2220
}

include/boost/smart_ptr/owner_hash.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// Distributed under the Boost Software License, Version 1.0.
66
// https://www.boost.org/LICENSE_1_0.txt
77

8-
#include <boost/config.hpp>
98
#include <cstddef>
109

1110
namespace boost
@@ -16,7 +15,7 @@ template<class T> struct owner_hash
1615
typedef std::size_t result_type;
1716
typedef T argument_type;
1817

19-
std::size_t operator()( T const & t ) const BOOST_NOEXCEPT
18+
std::size_t operator()( T const & t ) const noexcept
2019
{
2120
return t.owner_hash_value();
2221
}

include/boost/smart_ptr/owner_less.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
// See http://www.boost.org/libs/smart_ptr/ for documentation.
1515
//
1616

17-
#include <boost/config.hpp>
18-
1917
namespace boost
2018
{
2119

@@ -25,7 +23,7 @@ template<class T = void> struct owner_less
2523
typedef T first_argument_type;
2624
typedef T second_argument_type;
2725

28-
template<class U, class V> bool operator()( U const & u, V const & v ) const BOOST_NOEXCEPT
26+
template<class U, class V> bool operator()( U const & u, V const & v ) const noexcept
2927
{
3028
return u.owner_before( v );
3129
}

test/sp_constexpr_test2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct X: public boost::enable_shared_from_this<X>
4242
{
4343
int v_;
4444

45-
constexpr X() BOOST_NOEXCEPT: v_( 1 )
45+
constexpr X() noexcept: v_( 1 )
4646
{
4747
}
4848
};

0 commit comments

Comments
 (0)