File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -251,12 +251,6 @@ namespace xxx {
251
251
252
252
any_shared_ptr (any_shared_ptr const & other) noexcept { other.holder ()->clone (&my_inplace_storage); }
253
253
254
- any_shared_ptr (any_shared_ptr && other) noexcept
255
- {
256
- my_inplace_storage = other.my_inplace_storage ;
257
- ::new (&other.my_inplace_storage ) any_shared_ptr ();
258
- }
259
-
260
254
any_shared_ptr& operator =(any_shared_ptr const & other) noexcept
261
255
{
262
256
if (this != &other) {
@@ -267,12 +261,18 @@ namespace xxx {
267
261
return *this ;
268
262
}
269
263
264
+ any_shared_ptr (any_shared_ptr && other) noexcept
265
+ {
266
+ my_inplace_storage = other.my_inplace_storage ;
267
+ ::new (&other.my_inplace_storage ) EmptyHolder ();
268
+ }
269
+
270
270
any_shared_ptr& operator =(any_shared_ptr && other) noexcept
271
271
{
272
272
if (this != &other) {
273
273
this ->~any_shared_ptr ();
274
274
my_inplace_storage = other.my_inplace_storage ;
275
- ::new (&other.my_inplace_storage ) any_shared_ptr ();
275
+ ::new (&other.my_inplace_storage ) EmptyHolder ();
276
276
}
277
277
// else a self-move - do nothing
278
278
return *this ;
@@ -296,7 +296,7 @@ namespace xxx {
296
296
void reset () noexcept
297
297
{
298
298
this ->~any_shared_ptr ();
299
- ::new (this ) any_shared_ptr ();
299
+ ::new (this ) EmptyHolder ();
300
300
}
301
301
302
302
// -----------------------------------------------------
You can’t perform that action at this time.
0 commit comments