@@ -51,7 +51,7 @@ template<class T> class intrusive_ptr
51
51
52
52
typedef T element_type;
53
53
54
- BOOST_CONSTEXPR intrusive_ptr () BOOST_SP_NOEXCEPT : px( 0 )
54
+ BOOST_CONSTEXPR intrusive_ptr () noexcept : px( 0 )
55
55
{
56
56
}
57
57
@@ -85,12 +85,12 @@ template<class T> class intrusive_ptr
85
85
86
86
// Move support
87
87
88
- intrusive_ptr (intrusive_ptr && rhs) BOOST_SP_NOEXCEPT : px( rhs.px )
88
+ intrusive_ptr (intrusive_ptr && rhs) noexcept : px( rhs.px )
89
89
{
90
90
rhs.px = 0 ;
91
91
}
92
92
93
- intrusive_ptr & operator =(intrusive_ptr && rhs) BOOST_SP_NOEXCEPT
93
+ intrusive_ptr & operator =(intrusive_ptr && rhs) noexcept
94
94
{
95
95
this_type ( static_cast < intrusive_ptr && >( rhs ) ).swap (*this );
96
96
return *this ;
@@ -106,7 +106,7 @@ template<class T> class intrusive_ptr
106
106
}
107
107
108
108
template <class U >
109
- intrusive_ptr & operator =(intrusive_ptr<U> && rhs) BOOST_SP_NOEXCEPT
109
+ intrusive_ptr & operator =(intrusive_ptr<U> && rhs) noexcept
110
110
{
111
111
this_type ( static_cast < intrusive_ptr<U> && >( rhs ) ).swap (*this );
112
112
return *this ;
@@ -139,12 +139,12 @@ template<class T> class intrusive_ptr
139
139
this_type ( rhs, add_ref ).swap ( *this );
140
140
}
141
141
142
- T * get () const BOOST_SP_NOEXCEPT
142
+ T * get () const noexcept
143
143
{
144
144
return px;
145
145
}
146
146
147
- T * detach () BOOST_SP_NOEXCEPT
147
+ T * detach () noexcept
148
148
{
149
149
T * ret = px;
150
150
px = 0 ;
@@ -163,12 +163,12 @@ template<class T> class intrusive_ptr
163
163
return px;
164
164
}
165
165
166
- explicit operator bool () const BOOST_SP_NOEXCEPT
166
+ explicit operator bool () const noexcept
167
167
{
168
168
return px != 0 ;
169
169
}
170
170
171
- void swap (intrusive_ptr & rhs) BOOST_SP_NOEXCEPT
171
+ void swap (intrusive_ptr & rhs) noexcept
172
172
{
173
173
T * tmp = px;
174
174
px = rhs.px ;
@@ -180,69 +180,69 @@ template<class T> class intrusive_ptr
180
180
T * px;
181
181
};
182
182
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
184
184
{
185
185
return a.get () == b.get ();
186
186
}
187
187
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
189
189
{
190
190
return a.get () != b.get ();
191
191
}
192
192
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
194
194
{
195
195
return a.get () == b;
196
196
}
197
197
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
199
199
{
200
200
return a.get () != b;
201
201
}
202
202
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
204
204
{
205
205
return a == b.get ();
206
206
}
207
207
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
209
209
{
210
210
return a != b.get ();
211
211
}
212
212
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
214
214
{
215
215
return p.get () == 0 ;
216
216
}
217
217
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
219
219
{
220
220
return p.get () == 0 ;
221
221
}
222
222
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
224
224
{
225
225
return p.get () != 0 ;
226
226
}
227
227
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
229
229
{
230
230
return p.get () != 0 ;
231
231
}
232
232
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
234
234
{
235
235
return std::less<T *>()(a.get (), b.get ());
236
236
}
237
237
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
239
239
{
240
240
lhs.swap (rhs);
241
241
}
242
242
243
243
// mem_fn support
244
244
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
246
246
{
247
247
return p.get ();
248
248
}
@@ -264,17 +264,17 @@ template<class T, class U> intrusive_ptr<T> dynamic_pointer_cast(intrusive_ptr<U
264
264
return dynamic_cast <T *>(p.get ());
265
265
}
266
266
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
268
268
{
269
269
return intrusive_ptr<T>( static_cast <T*>( p.detach () ), false );
270
270
}
271
271
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
273
273
{
274
274
return intrusive_ptr<T>( const_cast <T*>( p.detach () ), false );
275
275
}
276
276
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
278
278
{
279
279
T * p2 = dynamic_cast <T*>( p.get () );
280
280
@@ -297,7 +297,7 @@ template<class Y> std::ostream & operator<< (std::ostream & os, intrusive_ptr<Y>
297
297
298
298
template < class T > struct hash ;
299
299
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
301
301
{
302
302
return boost::hash< T* >()( p.get () );
303
303
}
@@ -311,7 +311,7 @@ namespace std
311
311
312
312
template <class T > struct hash < ::boost::intrusive_ptr<T> >
313
313
{
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
315
315
{
316
316
return std::hash< T* >()( p.get () );
317
317
}
0 commit comments