Skip to content

Commit 7024892

Browse files
fsb4000ldionne
authored andcommitted
[libc++][test] Add '-Wdeprecated-copy', '-Wdeprecated-copy-dtor' warnings to the test suite
This is a follow up to https://reviews.llvm.org/D144694. Fixes #60977. Differential Revision: https://reviews.llvm.org/D144775
1 parent ec0f678 commit 7024892

File tree

36 files changed

+97
-6
lines changed

36 files changed

+97
-6
lines changed

libcxx/include/__exception/exception.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ class bad_exception : public exception {
7272
class _LIBCPP_EXPORTED_FROM_ABI exception {
7373
public:
7474
_LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {}
75-
_LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default;
75+
_LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default;
76+
_LIBCPP_HIDE_FROM_ABI exception& operator=(const exception&) _NOEXCEPT = default;
7677

7778
virtual ~exception() _NOEXCEPT;
7879
virtual const char* what() const _NOEXCEPT;
@@ -81,6 +82,8 @@ class _LIBCPP_EXPORTED_FROM_ABI exception {
8182
class _LIBCPP_EXPORTED_FROM_ABI bad_exception : public exception {
8283
public:
8384
_LIBCPP_HIDE_FROM_ABI bad_exception() _NOEXCEPT {}
85+
_LIBCPP_HIDE_FROM_ABI bad_exception(const bad_exception&) _NOEXCEPT = default;
86+
_LIBCPP_HIDE_FROM_ABI bad_exception& operator=(const bad_exception&) _NOEXCEPT = default;
8487
~bad_exception() _NOEXCEPT override;
8588
const char* what() const _NOEXCEPT override;
8689
};

libcxx/include/__exception/nested_exception.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class _LIBCPP_EXPORTED_FROM_ABI nested_exception {
3333

3434
public:
3535
nested_exception() _NOEXCEPT;
36-
// nested_exception(const nested_exception&) noexcept = default;
37-
// nested_exception& operator=(const nested_exception&) noexcept = default;
36+
_LIBCPP_HIDE_FROM_ABI nested_exception(const nested_exception&) _NOEXCEPT = default;
37+
_LIBCPP_HIDE_FROM_ABI nested_exception& operator=(const nested_exception&) _NOEXCEPT = default;
3838
virtual ~nested_exception() _NOEXCEPT;
3939

4040
// access functions

libcxx/include/__expected/expected.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,8 @@ class expected {
928928
requires(is_trivially_move_constructible_v<_ValueType> && is_trivially_move_constructible_v<_ErrorType>)
929929
union __union_t<_ValueType, _ErrorType> {
930930
_LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {}
931+
_LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default;
932+
_LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default;
931933

932934
template <class _Func, class... _Args>
933935
_LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(
@@ -1529,6 +1531,8 @@ class expected<_Tp, _Err> {
15291531
requires is_trivially_move_constructible_v<_ErrorType>
15301532
union __union_t<_ErrorType> {
15311533
_LIBCPP_HIDE_FROM_ABI constexpr __union_t() : __empty_() {}
1534+
_LIBCPP_HIDE_FROM_ABI constexpr __union_t(const __union_t&) = default;
1535+
_LIBCPP_HIDE_FROM_ABI constexpr __union_t& operator=(const __union_t&) = default;
15321536

15331537
template <class _Func, class... _Args>
15341538
_LIBCPP_HIDE_FROM_ABI constexpr explicit __union_t(

libcxx/include/__format/format_error.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class _LIBCPP_EXPORTED_FROM_ABI format_error : public runtime_error {
3030
: runtime_error(__s) {}
3131
_LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
3232
: runtime_error(__s) {}
33+
_LIBCPP_HIDE_FROM_ABI format_error(const format_error&) = default;
34+
_LIBCPP_HIDE_FROM_ABI format_error& operator=(const format_error&) = default;
3335
_LIBCPP_HIDE_FROM_ABI_VIRTUAL
3436
~format_error() noexcept override = default;
3537
};

libcxx/include/__functional/function.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_function_call
5757
: public exception
5858
{
5959
public:
60+
_LIBCPP_HIDE_FROM_ABI bad_function_call() _NOEXCEPT = default;
61+
_LIBCPP_HIDE_FROM_ABI bad_function_call(const bad_function_call&) _NOEXCEPT = default;
62+
_LIBCPP_HIDE_FROM_ABI bad_function_call& operator=(const bad_function_call&) _NOEXCEPT = default;
6063
// Note that when a key function is not used, every translation unit that uses
6164
// bad_function_call will end up containing a weak definition of the vtable and
6265
// typeinfo.

libcxx/include/__memory/shared_ptr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_weak_ptr
126126
public:
127127
_LIBCPP_HIDE_FROM_ABI bad_weak_ptr() _NOEXCEPT = default;
128128
_LIBCPP_HIDE_FROM_ABI bad_weak_ptr(const bad_weak_ptr&) _NOEXCEPT = default;
129+
_LIBCPP_HIDE_FROM_ABI bad_weak_ptr& operator=(const bad_weak_ptr&) _NOEXCEPT = default;
129130
~bad_weak_ptr() _NOEXCEPT override;
130131
const char* what() const _NOEXCEPT override;
131132
};

libcxx/include/new

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_alloc
133133
{
134134
public:
135135
bad_alloc() _NOEXCEPT;
136+
_LIBCPP_HIDE_FROM_ABI bad_alloc(const bad_alloc&) _NOEXCEPT = default;
137+
_LIBCPP_HIDE_FROM_ABI bad_alloc& operator=(const bad_alloc&) _NOEXCEPT = default;
136138
~bad_alloc() _NOEXCEPT override;
137139
const char* what() const _NOEXCEPT override;
138140
};
@@ -142,6 +144,8 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_array_new_length
142144
{
143145
public:
144146
bad_array_new_length() _NOEXCEPT;
147+
_LIBCPP_HIDE_FROM_ABI bad_array_new_length(const bad_array_new_length&) _NOEXCEPT = default;
148+
_LIBCPP_HIDE_FROM_ABI bad_array_new_length& operator=(const bad_array_new_length&) _NOEXCEPT = default;
145149
~bad_array_new_length() _NOEXCEPT override;
146150
const char* what() const _NOEXCEPT override;
147151
};

libcxx/include/optional

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_opt
249249
: public exception
250250
{
251251
public:
252+
_LIBCPP_HIDE_FROM_ABI bad_optional_access() _NOEXCEPT = default;
253+
_LIBCPP_HIDE_FROM_ABI bad_optional_access(const bad_optional_access&) _NOEXCEPT = default;
254+
_LIBCPP_HIDE_FROM_ABI bad_optional_access& operator=(const bad_optional_access&) _NOEXCEPT = default;
252255
// Get the key function ~bad_optional_access() into the dylib
253256
~bad_optional_access() _NOEXCEPT override;
254257
const char* what() const _NOEXCEPT override;

libcxx/include/stdexcept

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public:
129129

130130
#ifndef _LIBCPP_ABI_VCRUNTIME
131131
_LIBCPP_HIDE_FROM_ABI domain_error(const domain_error&) _NOEXCEPT = default;
132+
_LIBCPP_HIDE_FROM_ABI domain_error& operator=(const domain_error&) _NOEXCEPT = default;
132133
~domain_error() _NOEXCEPT override;
133134
#endif
134135
};
@@ -142,6 +143,7 @@ public:
142143

143144
#ifndef _LIBCPP_ABI_VCRUNTIME
144145
_LIBCPP_HIDE_FROM_ABI invalid_argument(const invalid_argument&) _NOEXCEPT = default;
146+
_LIBCPP_HIDE_FROM_ABI invalid_argument& operator=(const invalid_argument&) _NOEXCEPT = default;
145147
~invalid_argument() _NOEXCEPT override;
146148
#endif
147149
};
@@ -154,6 +156,7 @@ public:
154156
_LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s) : logic_error(__s) {}
155157
#ifndef _LIBCPP_ABI_VCRUNTIME
156158
_LIBCPP_HIDE_FROM_ABI length_error(const length_error&) _NOEXCEPT = default;
159+
_LIBCPP_HIDE_FROM_ABI length_error& operator=(const length_error&) _NOEXCEPT = default;
157160
~length_error() _NOEXCEPT override;
158161
#endif
159162
};
@@ -167,6 +170,7 @@ public:
167170

168171
#ifndef _LIBCPP_ABI_VCRUNTIME
169172
_LIBCPP_HIDE_FROM_ABI out_of_range(const out_of_range&) _NOEXCEPT = default;
173+
_LIBCPP_HIDE_FROM_ABI out_of_range& operator=(const out_of_range&) _NOEXCEPT = default;
170174
~out_of_range() _NOEXCEPT override;
171175
#endif
172176
};
@@ -180,6 +184,7 @@ public:
180184

181185
#ifndef _LIBCPP_ABI_VCRUNTIME
182186
_LIBCPP_HIDE_FROM_ABI range_error(const range_error&) _NOEXCEPT = default;
187+
_LIBCPP_HIDE_FROM_ABI range_error& operator=(const range_error&) _NOEXCEPT = default;
183188
~range_error() _NOEXCEPT override;
184189
#endif
185190
};
@@ -193,6 +198,7 @@ public:
193198

194199
#ifndef _LIBCPP_ABI_VCRUNTIME
195200
_LIBCPP_HIDE_FROM_ABI overflow_error(const overflow_error&) _NOEXCEPT = default;
201+
_LIBCPP_HIDE_FROM_ABI overflow_error& operator=(const overflow_error&) _NOEXCEPT = default;
196202
~overflow_error() _NOEXCEPT override;
197203
#endif
198204
};
@@ -206,6 +212,7 @@ public:
206212

207213
#ifndef _LIBCPP_ABI_VCRUNTIME
208214
_LIBCPP_HIDE_FROM_ABI underflow_error(const underflow_error&) _NOEXCEPT = default;
215+
_LIBCPP_HIDE_FROM_ABI underflow_error& operator=(const underflow_error&) _NOEXCEPT = default;
209216
~underflow_error() _NOEXCEPT override;
210217
#endif
211218
};

libcxx/include/typeinfo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_cast
360360
public:
361361
bad_cast() _NOEXCEPT;
362362
_LIBCPP_HIDE_FROM_ABI bad_cast(const bad_cast&) _NOEXCEPT = default;
363+
_LIBCPP_HIDE_FROM_ABI bad_cast& operator=(const bad_cast&) _NOEXCEPT = default;
363364
~bad_cast() _NOEXCEPT override;
364365
const char* what() const _NOEXCEPT override;
365366
};
@@ -369,6 +370,8 @@ class _LIBCPP_EXPORTED_FROM_ABI bad_typeid
369370
{
370371
public:
371372
bad_typeid() _NOEXCEPT;
373+
_LIBCPP_HIDE_FROM_ABI bad_typeid(const bad_typeid&) _NOEXCEPT = default;
374+
_LIBCPP_HIDE_FROM_ABI bad_typeid& operator=(const bad_typeid&) _NOEXCEPT = default;
372375
~bad_typeid() _NOEXCEPT override;
373376
const char* what() const _NOEXCEPT override;
374377
};

libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/arrow.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class A
2929
int data_;
3030
public:
3131
A() : data_(1) {}
32+
A(const A&) = default;
33+
A& operator=(const A&) = default;
3234
~A() {data_ = -1;}
3335

3436
int get() const {return data_;}
@@ -50,6 +52,8 @@ class B
5052
int data_;
5153
public:
5254
B(int d=1) : data_(d) {}
55+
B(const B&) = default;
56+
B& operator=(const B&) = default;
5357
~B() {data_ = -1;}
5458

5559
int get() const {return data_;}

libcxx/test/libcxx/iterators/predef.iterators/__unconstrained_reverse_iterator/reverse.iter.elem/dereference.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class A
2727
int data_;
2828
public:
2929
A() : data_(1) {}
30+
A(const A&) = default;
31+
A& operator=(const A&) = default;
3032
~A() {data_ = -1;}
3133

3234
friend bool operator==(const A& x, const A& y)

libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ struct Node {
2424
int* shared_val;
2525

2626
explicit Node(int* ptr) : shared_val(ptr) {}
27+
Node(const Node&) = default;
28+
Node& operator=(const Node&) = default;
2729
~Node() { ++(*shared_val); }
2830
};
2931

libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ struct Base {
2626

2727
explicit Base(char* buf, int* idx, char ch)
2828
: shared_buff(buf), cur_idx(idx), id(ch) {}
29+
Base(const Base& other) = default;
30+
Base& operator=(const Base&) = delete;
2931
~Base() { shared_buff[(*cur_idx)++] = id; }
3032
};
3133

libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ __attribute__((noinline)) void call_something() { asm volatile(""); }
2121

2222
struct Node {
2323
explicit Node() {}
24+
Node(const Node&) = default;
25+
Node& operator=(const Node&) = default;
2426
~Node() {}
2527
};
2628

libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ __attribute__((noinline)) void call_something() { asm volatile(""); }
2121

2222
struct Node {
2323
explicit Node() {}
24+
Node(const Node&) = default;
25+
Node& operator=(const Node&) = default;
2426
~Node() {}
2527
};
2628

libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ struct A
2424
static std::function<void()> global;
2525
static bool cancel;
2626

27+
A() = default;
28+
A(const A&) = default;
29+
A& operator=(const A&) = default;
2730
~A() {
2831
DoNotOptimize(cancel);
2932
if (cancel)

libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ struct A
2424
static std::function<void()> global;
2525
static bool cancel;
2626

27+
A() = default;
28+
A(const A&) = default;
29+
A& operator=(const A&) = default;
2730
~A() {
2831
DoNotOptimize(cancel);
2932
if (cancel)

libcxx/test/std/iterators/predef.iterators/insert.iterators/back.insert.iter.ops/back.insert.iter.op=/lv_value.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class Copyable
3737
int data_;
3838
public:
3939
Copyable() : data_(0) {}
40+
Copyable(const Copyable&) = default;
41+
Copyable& operator=(const Copyable&) = default;
4042
~Copyable() {data_ = -1;}
4143

4244
friend bool operator==(const Copyable& x, const Copyable& y)

libcxx/test/std/iterators/predef.iterators/insert.iterators/front.insert.iter.ops/front.insert.iter.op=/lv_value.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class Copyable
3737
int data_;
3838
public:
3939
Copyable() : data_(0) {}
40+
Copyable(const Copyable&) = default;
41+
Copyable& operator=(const Copyable&) = default;
4042
~Copyable() {data_ = -1;}
4143

4244
friend bool operator==(const Copyable& x, const Copyable& y)

libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.star/op_star.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class A
2626
int data_;
2727
public:
2828
A() : data_(1) {}
29+
A(const A&) = default;
30+
A& operator=(const A&) = default;
2931
~A() {data_ = -1;}
3032

3133
friend bool operator==(const A& x, const A& y)

libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/arrow.pass.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class A
2929
int data_;
3030
public:
3131
A() : data_(1) {}
32+
A(const A&) = default;
33+
A& operator=(const A&) = default;
3234
~A() {data_ = -1;}
3335

3436
int get() const {return data_;}
@@ -50,6 +52,8 @@ class B
5052
int data_;
5153
public:
5254
B(int d=1) : data_(d) {}
55+
B(const B&) = default;
56+
B& operator=(const B&) = default;
5357
~B() {data_ = -1;}
5458

5559
int get() const {return data_;}

libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/dereference.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ class A
2727
int data_;
2828
public:
2929
A() : data_(1) {}
30+
A(const A&) = default;
31+
A& operator=(const A&) = default;
3032
~A() {data_ = -1;}
3133

3234
friend bool operator==(const A& x, const A& y)

libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ struct goroutine
2929
rh = nullptr;
3030
}
3131

32+
goroutine() = default;
33+
goroutine(const goroutine&) = default;
34+
goroutine& operator=(const goroutine&) = default;
3235
~goroutine() {}
3336

3437
static void run_one()

libcxx/test/std/language.support/support.dynamic/new.delete/types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ struct TrackLifetime {
2222
TrackLifetime(LifetimeInformation& info) : info_(&info) {
2323
info_->address_constructed = this;
2424
}
25+
TrackLifetime(TrackLifetime const&) = default;
2526
~TrackLifetime() {
2627
info_->address_destroyed = this;
2728
}
@@ -43,6 +44,7 @@ struct alignas(std::max_align_t) TrackLifetimeMaxAligned {
4344
TrackLifetimeMaxAligned(LifetimeInformation& info) : info_(&info) {
4445
info_->address_constructed = this;
4546
}
47+
TrackLifetimeMaxAligned(TrackLifetimeMaxAligned const&) = default;
4648
~TrackLifetimeMaxAligned() {
4749
info_->address_destroyed = this;
4850
}

libcxx/test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class A
2828
int data_;
2929
public:
3030
explicit A(int data) : data_(data) {}
31+
A(const A&) = default;
32+
A& operator=(const A&) = default;
3133
virtual ~A() TEST_NOEXCEPT {}
3234

3335
friend bool operator==(const A& x, const A& y) {return x.data_ == y.data_;}

libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ struct ZeroOnDestroy : std::ranges::view_base {
2929
constexpr ForwardIter end() { return ForwardIter(buff + 8); }
3030
constexpr ForwardIter end() const { return ForwardIter(); }
3131

32+
ZeroOnDestroy() = default;
33+
ZeroOnDestroy(const ZeroOnDestroy&) = default;
34+
ZeroOnDestroy& operator=(const ZeroOnDestroy&) = default;
3235
~ZeroOnDestroy() {
3336
std::memset(buff, 0, sizeof(buff));
3437
}

libcxx/test/std/utilities/tuple/tuple.tuple/alloc_first.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ struct alloc_first
4444
allocator_constructed = true;
4545
}
4646

47+
alloc_first(const alloc_first&) = default;
48+
alloc_first& operator=(const alloc_first&) = default;
4749
~alloc_first() {data_ = -1;}
4850

4951
friend bool operator==(const alloc_first& x, const alloc_first& y)

libcxx/test/std/utilities/tuple/tuple.tuple/alloc_last.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ struct alloc_last
4444
allocator_constructed = true;
4545
}
4646

47+
alloc_last(const alloc_last&) = default;
48+
alloc_last& operator=(const alloc_last&) = default;
4749
~alloc_last() {data_ = -1;}
4850

4951
friend bool operator==(const alloc_last& x, const alloc_last& y)

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
struct B {
2727
int id_;
2828
explicit B(int i = 0) : id_(i) {}
29+
B(const B&) = default;
30+
B& operator=(const B&) = default;
2931
virtual ~B() {}
3032
};
3133

libcxx/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/convert_move.pass.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ struct B
3636
int id_;
3737

3838
explicit B(int i) : id_(i) {}
39-
39+
B(const B&) = default;
40+
B& operator=(const B&) = default;
4041
virtual ~B() {}
4142
};
4243

0 commit comments

Comments
 (0)