File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -161,23 +161,10 @@ public:
161
161
Moves unique_ptr to this instance.
162
162
163
163
This is a reuse of copy-constructors, and is unique to unique_ptr.
164
-
165
- This exists for DMD support.
166
164
*/
167
165
@trusted
168
166
this (ref const (unique_ptr! T) other) {
169
-
170
- // Free our own refcount if need be
171
- if (this .rc) {
172
- this .reset();
173
- }
174
-
175
- // atomically moves the reference from this unique_ptr to the other unique_ptr reference
176
- // after this is done, rc is set to null to make this unique_ptr invalid.
177
- atomicStore(this .rc, cast (refcountmg_t! (T)* )other.rc);
178
-
179
- // For LDC2 we'll need to do some more cursed pointer casts to be able to call clear on a const.
180
- (cast (unique_ptr! (T)* )&other).clear();
167
+ this (* (cast (unique_ptr! (T)* )&other));
181
168
}
182
169
183
170
// Destructor
You can’t perform that action at this time.
0 commit comments