Skip to content

Commit a144ae0

Browse files
committed
Remove uses of BOOST_SP_NOEXCEPT from intrusive_ptr.hpp
1 parent 0bb0b0d commit a144ae0

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

include/boost/smart_ptr/intrusive_ptr.hpp

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ template<class T> class intrusive_ptr
5151

5252
typedef T element_type;
5353

54-
BOOST_CONSTEXPR intrusive_ptr() BOOST_SP_NOEXCEPT : px( 0 )
54+
BOOST_CONSTEXPR intrusive_ptr() noexcept : px( 0 )
5555
{
5656
}
5757

@@ -85,12 +85,12 @@ template<class T> class intrusive_ptr
8585

8686
// Move support
8787

88-
intrusive_ptr(intrusive_ptr && rhs) BOOST_SP_NOEXCEPT : px( rhs.px )
88+
intrusive_ptr(intrusive_ptr && rhs) noexcept : px( rhs.px )
8989
{
9090
rhs.px = 0;
9191
}
9292

93-
intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_SP_NOEXCEPT
93+
intrusive_ptr & operator=(intrusive_ptr && rhs) noexcept
9494
{
9595
this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this);
9696
return *this;
@@ -106,7 +106,7 @@ template<class T> class intrusive_ptr
106106
}
107107

108108
template<class U>
109-
intrusive_ptr & operator=(intrusive_ptr<U> && rhs) BOOST_SP_NOEXCEPT
109+
intrusive_ptr & operator=(intrusive_ptr<U> && rhs) noexcept
110110
{
111111
this_type( static_cast< intrusive_ptr<U> && >( rhs ) ).swap(*this);
112112
return *this;
@@ -139,12 +139,12 @@ template<class T> class intrusive_ptr
139139
this_type( rhs, add_ref ).swap( *this );
140140
}
141141

142-
T * get() const BOOST_SP_NOEXCEPT
142+
T * get() const noexcept
143143
{
144144
return px;
145145
}
146146

147-
T * detach() BOOST_SP_NOEXCEPT
147+
T * detach() noexcept
148148
{
149149
T * ret = px;
150150
px = 0;
@@ -163,12 +163,12 @@ template<class T> class intrusive_ptr
163163
return px;
164164
}
165165

166-
explicit operator bool () const BOOST_SP_NOEXCEPT
166+
explicit operator bool () const noexcept
167167
{
168168
return px != 0;
169169
}
170170

171-
void swap(intrusive_ptr & rhs) BOOST_SP_NOEXCEPT
171+
void swap(intrusive_ptr & rhs) noexcept
172172
{
173173
T * tmp = px;
174174
px = rhs.px;
@@ -180,69 +180,69 @@ template<class T> class intrusive_ptr
180180
T * px;
181181
};
182182

183-
template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) BOOST_SP_NOEXCEPT
183+
template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) noexcept
184184
{
185185
return a.get() == b.get();
186186
}
187187

188-
template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) BOOST_SP_NOEXCEPT
188+
template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, intrusive_ptr<U> const & b) noexcept
189189
{
190190
return a.get() != b.get();
191191
}
192192

193-
template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, U * b) BOOST_SP_NOEXCEPT
193+
template<class T, class U> inline bool operator==(intrusive_ptr<T> const & a, U * b) noexcept
194194
{
195195
return a.get() == b;
196196
}
197197

198-
template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, U * b) BOOST_SP_NOEXCEPT
198+
template<class T, class U> inline bool operator!=(intrusive_ptr<T> const & a, U * b) noexcept
199199
{
200200
return a.get() != b;
201201
}
202202

203-
template<class T, class U> inline bool operator==(T * a, intrusive_ptr<U> const & b) BOOST_SP_NOEXCEPT
203+
template<class T, class U> inline bool operator==(T * a, intrusive_ptr<U> const & b) noexcept
204204
{
205205
return a == b.get();
206206
}
207207

208-
template<class T, class U> inline bool operator!=(T * a, intrusive_ptr<U> const & b) BOOST_SP_NOEXCEPT
208+
template<class T, class U> inline bool operator!=(T * a, intrusive_ptr<U> const & b) noexcept
209209
{
210210
return a != b.get();
211211
}
212212

213-
template<class T> inline bool operator==( intrusive_ptr<T> const & p, std::nullptr_t ) BOOST_SP_NOEXCEPT
213+
template<class T> inline bool operator==( intrusive_ptr<T> const & p, std::nullptr_t ) noexcept
214214
{
215215
return p.get() == 0;
216216
}
217217

218-
template<class T> inline bool operator==( std::nullptr_t, intrusive_ptr<T> const & p ) BOOST_SP_NOEXCEPT
218+
template<class T> inline bool operator==( std::nullptr_t, intrusive_ptr<T> const & p ) noexcept
219219
{
220220
return p.get() == 0;
221221
}
222222

223-
template<class T> inline bool operator!=( intrusive_ptr<T> const & p, std::nullptr_t ) BOOST_SP_NOEXCEPT
223+
template<class T> inline bool operator!=( intrusive_ptr<T> const & p, std::nullptr_t ) noexcept
224224
{
225225
return p.get() != 0;
226226
}
227227

228-
template<class T> inline bool operator!=( std::nullptr_t, intrusive_ptr<T> const & p ) BOOST_SP_NOEXCEPT
228+
template<class T> inline bool operator!=( std::nullptr_t, intrusive_ptr<T> const & p ) noexcept
229229
{
230230
return p.get() != 0;
231231
}
232232

233-
template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b) BOOST_SP_NOEXCEPT
233+
template<class T> inline bool operator<(intrusive_ptr<T> const & a, intrusive_ptr<T> const & b) noexcept
234234
{
235235
return std::less<T *>()(a.get(), b.get());
236236
}
237237

238-
template<class T> void swap(intrusive_ptr<T> & lhs, intrusive_ptr<T> & rhs) BOOST_SP_NOEXCEPT
238+
template<class T> void swap(intrusive_ptr<T> & lhs, intrusive_ptr<T> & rhs) noexcept
239239
{
240240
lhs.swap(rhs);
241241
}
242242

243243
// mem_fn support
244244

245-
template<class T> T * get_pointer(intrusive_ptr<T> const & p) BOOST_SP_NOEXCEPT
245+
template<class T> T * get_pointer(intrusive_ptr<T> const & p) noexcept
246246
{
247247
return p.get();
248248
}
@@ -264,17 +264,17 @@ template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast(intrusive_ptr<U
264264
return dynamic_cast<T *>(p.get());
265265
}
266266

267-
template<class T, class U> intrusive_ptr<T> static_pointer_cast( intrusive_ptr<U> && p ) BOOST_SP_NOEXCEPT
267+
template<class T, class U> intrusive_ptr<T> static_pointer_cast( intrusive_ptr<U> && p ) noexcept
268268
{
269269
return intrusive_ptr<T>( static_cast<T*>( p.detach() ), false );
270270
}
271271

272-
template<class T, class U> intrusive_ptr<T> const_pointer_cast( intrusive_ptr<U> && p ) BOOST_SP_NOEXCEPT
272+
template<class T, class U> intrusive_ptr<T> const_pointer_cast( intrusive_ptr<U> && p ) noexcept
273273
{
274274
return intrusive_ptr<T>( const_cast<T*>( p.detach() ), false );
275275
}
276276

277-
template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast( intrusive_ptr<U> && p ) BOOST_SP_NOEXCEPT
277+
template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast( intrusive_ptr<U> && p ) noexcept
278278
{
279279
T * p2 = dynamic_cast<T*>( p.get() );
280280

@@ -297,7 +297,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y>
297297

298298
template< class T > struct hash;
299299

300-
template< class T > std::size_t hash_value( boost::intrusive_ptr<T> const & p ) BOOST_SP_NOEXCEPT
300+
template< class T > std::size_t hash_value( boost::intrusive_ptr<T> const & p ) noexcept
301301
{
302302
return boost::hash< T* >()( p.get() );
303303
}
@@ -311,7 +311,7 @@ namespace std
311311

312312
template<class T> struct hash< ::boost::intrusive_ptr<T> >
313313
{
314-
std::size_t operator()( ::boost::intrusive_ptr<T> const & p ) const BOOST_SP_NOEXCEPT
314+
std::size_t operator()( ::boost::intrusive_ptr<T> const & p ) const noexcept
315315
{
316316
return std::hash< T* >()( p.get() );
317317
}

0 commit comments

Comments
 (0)