Skip to content

Commit f852cb0

Browse files
authored
Clearing the way for LLVM 13 (#2266)
1 parent 3c2fd04 commit f852cb0

File tree

8 files changed

+13
-11
lines changed

8 files changed

+13
-11
lines changed

stl/inc/iomanip

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ struct _Monobj { // store reference to monetary amount
5757

5858
_Money& _Val; // the monetary amount reference
5959
bool _Intl; // international flag
60-
61-
_Monobj& operator=(const _Monobj&) = delete;
6260
};
6361

6462
template <class _Money>
@@ -195,15 +193,15 @@ struct _Quote_in { // store reference to string
195193
_Mystr& _Str; // reference to string
196194
_Elem _Delim; // delimiter element
197195
_Elem _Escape; // escape element
198-
199-
_Quote_in& operator=(const _Quote_in&) = delete;
200196
};
201197

202198
template <class _Elem, class _Traits, class _Sizet>
203199
struct _Quote_out { // store pointer/length for string
204200
_Quote_out(const _Elem* _Ptr_obj, _Sizet _Size_obj, _Elem _Delim_obj, _Elem _Escape_obj)
205201
: _Ptr(_Ptr_obj), _Size(_Size_obj), _Delim(_Delim_obj), _Escape(_Escape_obj) {}
206202

203+
_Quote_out(const _Quote_out&) = default;
204+
207205
const _Elem* _Ptr; // pointer to string
208206
_Sizet _Size; // length of string
209207
_Elem _Delim; // delimiter element

stl/inc/regex

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ struct _Cmp_icase { // functor to compare for case-insensitive equality
201201
}
202202

203203
const _RxTraits& _Traits;
204-
205-
_Cmp_icase& operator=(const _Cmp_icase&) = delete;
206204
};
207205

208206
template <class _RxTraits>
@@ -216,8 +214,6 @@ struct _Cmp_collate { // functor to compare for locale-specific equality
216214
}
217215

218216
const _RxTraits& _Traits;
219-
220-
_Cmp_collate& operator=(const _Cmp_collate&) = delete;
221217
};
222218

223219
struct _Regex_traits_base { // base of all regular expression traits

tests/std/tests/Dev10_561430_list_and_tree_leaks/test.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ template <typename T>
2929
struct Mallocator {
3030
typedef T value_type;
3131

32-
Mallocator() {}
32+
Mallocator() = default;
33+
Mallocator(const Mallocator&) = default;
34+
3335
template <typename U>
3436
Mallocator(const Mallocator<U>&) {}
3537

38+
Mallocator& operator=(const Mallocator&) = delete;
39+
3640
bool operator==(const Mallocator&) const {
3741
return true;
3842
}
@@ -63,8 +67,6 @@ struct Mallocator {
6367

6468
free(p);
6569
}
66-
67-
Mallocator& operator=(const Mallocator&) = delete;
6870
};
6971

7072
template <typename C>

tests/std/tests/Dev11_0863628_atomic_compare_exchange/test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ void helper2() {
150150
const Atom const_atom(obj);
151151

152152
bool b = const_atom.is_lock_free();
153+
(void) b;
153154

154155
atom.store(obj);
155156
atom.store(obj, memory_order_seq_cst);

tests/std/tests/VSO_0191296_allocator_construct/test.compile.pass.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ struct construct_applying_allocator {
134134
template <typename Other>
135135
construct_applying_allocator(const construct_applying_allocator<Other, POCCA, POCMA, POCS>&) {}
136136

137+
construct_applying_allocator& operator=(const construct_applying_allocator&) = default;
138+
137139
using propagate_on_container_copy_assignment = std::bool_constant<POCCA>;
138140
using propagate_on_container_move_assignment = std::bool_constant<POCMA>;
139141
using propagate_on_container_swap = std::bool_constant<POCS>;

tests/tr1/tests/functional/test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ void test_main() { // test basic workings of functional definitions
223223
test_pointer(first, last, dest);
224224

225225
CSTD size_t hash_val = STD hash<int>()(3);
226+
(void) hash_val;
226227

227228
hash_val = STD hash<double>()(3.0);
228229
hash_val = STD hash<STD string>()(STD string("abc"));

tests/tr1/tests/memory3/test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ void t_hash() { // test hash functions
233233
typedef STD shared_ptr<int> sptr_t;
234234
sptr_t sp0;
235235
CSTD size_t hash_val = STD hash<sptr_t>()(sp0);
236+
(void) hash_val;
236237

237238
typedef STD unique_ptr<int> uptr_t;
238239
uptr_t up0;

tests/tr1/tests/string1/test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ void test_main() { // test basic workings of string definitions
554554
hash_val = STD hash<STD wstring>()(STD wstring(L"abc"));
555555
hash_val = STD hash<STD u16string>()(STD u16string(3, 'x'));
556556
hash_val = STD hash<STD u32string>()(STD u32string(3, 'x'));
557+
(void) hash_val;
557558
}
558559

559560
{

0 commit comments

Comments
 (0)