@@ -161,6 +161,8 @@ class MyObject4a {
161
161
print_created (this );
162
162
pointer_set<MyObject4a>().insert (this );
163
163
};
164
+ MyObject4a (const MyObject4a &) = delete ;
165
+
164
166
int value;
165
167
166
168
static void cleanupAllInstances () {
@@ -182,13 +184,15 @@ class MyObject4a {
182
184
class MyObject4b : public MyObject4a {
183
185
public:
184
186
explicit MyObject4b (int i) : MyObject4a(i) { print_created (this ); }
187
+ MyObject4b (const MyObject4b &) = delete ;
185
188
~MyObject4b () override { print_destroyed (this ); }
186
189
};
187
190
188
191
// test_large_holder
189
192
class MyObject5 { // managed by huge_unique_ptr
190
193
public:
191
194
explicit MyObject5 (int value) : value{value} { print_created (this ); }
195
+ MyObject5 (const MyObject5 &) = delete ;
192
196
~MyObject5 () { print_destroyed (this ); }
193
197
int value;
194
198
};
@@ -245,6 +249,7 @@ struct SharedFromThisVirt : virtual SharedFromThisVBase {};
245
249
// test_move_only_holder
246
250
struct C {
247
251
C () { print_created (this ); }
252
+ C (const C &) = delete ;
248
253
~C () { print_destroyed (this ); }
249
254
};
250
255
@@ -265,6 +270,7 @@ struct TypeForHolderWithAddressOf {
265
270
// test_move_only_holder_with_addressof_operator
266
271
struct TypeForMoveOnlyHolderWithAddressOf {
267
272
explicit TypeForMoveOnlyHolderWithAddressOf (int value) : value{value} { print_created (this ); }
273
+ TypeForMoveOnlyHolderWithAddressOf (const TypeForMoveOnlyHolderWithAddressOf &) = delete ;
268
274
~TypeForMoveOnlyHolderWithAddressOf () { print_destroyed (this ); }
269
275
std::string toString () const {
270
276
return " MoveOnlyHolderWithAddressOf[" + std::to_string (value) + " ]" ;
0 commit comments