Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing the way for LLVM 13 #2266

Merged
merged 3 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions stl/inc/iomanip
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ struct _Monobj { // store reference to monetary amount

_Money& _Val; // the monetary amount reference
bool _Intl; // international flag

_Monobj& operator=(const _Monobj&) = delete;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change requested: I vaguely recall that these were deleted because of obnoxious compiler warnings of the form "whoa, there's a reference data member, I won't be able to generate an assignment operator, and I'm going to warn about this even before you attempt to assign any objects". I believe that these warnings were fixed 🎉 and if we're not seeing them in the test suite then we're good to go.

};

template <class _Money>
Expand Down Expand Up @@ -195,15 +193,15 @@ struct _Quote_in { // store reference to string
_Mystr& _Str; // reference to string
_Elem _Delim; // delimiter element
_Elem _Escape; // escape element

_Quote_in& operator=(const _Quote_in&) = delete;
};

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

_Quote_out(const _Quote_out&) = default;

const _Elem* _Ptr; // pointer to string
_Sizet _Size; // length of string
_Elem _Delim; // delimiter element
Expand Down
4 changes: 0 additions & 4 deletions stl/inc/regex
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,6 @@ struct _Cmp_icase { // functor to compare for case-insensitive equality
}

const _RxTraits& _Traits;

_Cmp_icase& operator=(const _Cmp_icase&) = delete;
mnatsuhara marked this conversation as resolved.
Show resolved Hide resolved
};

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

const _RxTraits& _Traits;

_Cmp_collate& operator=(const _Cmp_collate&) = delete;
};

struct _Regex_traits_base { // base of all regular expression traits
Expand Down
8 changes: 5 additions & 3 deletions tests/std/tests/Dev10_561430_list_and_tree_leaks/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ template <typename T>
struct Mallocator {
typedef T value_type;

Mallocator() {}
Mallocator() = default;
Mallocator(const Mallocator&) = default;

template <typename U>
Mallocator(const Mallocator<U>&) {}

Mallocator& operator=(const Mallocator&) = delete;

bool operator==(const Mallocator&) const {
return true;
}
Expand Down Expand Up @@ -63,8 +67,6 @@ struct Mallocator {

free(p);
}

Mallocator& operator=(const Mallocator&) = delete;
};

template <typename C>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ void helper2() {
const Atom const_atom(obj);

bool b = const_atom.is_lock_free();
(void) b;

atom.store(obj);
atom.store(obj, memory_order_seq_cst);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ struct construct_applying_allocator {
template <typename Other>
construct_applying_allocator(const construct_applying_allocator<Other, POCCA, POCMA, POCS>&) {}

construct_applying_allocator& operator=(const construct_applying_allocator&) = default;

using propagate_on_container_copy_assignment = std::bool_constant<POCCA>;
using propagate_on_container_move_assignment = std::bool_constant<POCMA>;
using propagate_on_container_swap = std::bool_constant<POCS>;
Expand Down
1 change: 1 addition & 0 deletions tests/tr1/tests/functional/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ void test_main() { // test basic workings of functional definitions
test_pointer(first, last, dest);

CSTD size_t hash_val = STD hash<int>()(3);
(void) hash_val;

hash_val = STD hash<double>()(3.0);
hash_val = STD hash<STD string>()(STD string("abc"));
Expand Down
1 change: 1 addition & 0 deletions tests/tr1/tests/memory3/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ void t_hash() { // test hash functions
typedef STD shared_ptr<int> sptr_t;
sptr_t sp0;
CSTD size_t hash_val = STD hash<sptr_t>()(sp0);
(void) hash_val;

typedef STD unique_ptr<int> uptr_t;
uptr_t up0;
Expand Down
1 change: 1 addition & 0 deletions tests/tr1/tests/string1/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ void test_main() { // test basic workings of string definitions
hash_val = STD hash<STD wstring>()(STD wstring(L"abc"));
hash_val = STD hash<STD u16string>()(STD u16string(3, 'x'));
hash_val = STD hash<STD u32string>()(STD u32string(3, 'x'));
(void) hash_val;
}

{
Expand Down