This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
The solution for PR 77537 causes ambiguities due to the extra copy assignment operator taking a __nonesuch_no_braces parameter. The copy and move assignment operators can be defined as defaulted to meet the semantics required by the standard. In order to preserve ABI compatibility (specifically argument passing conventions for pair<T, T>) we need a new base class that makes the assignment operators non-trivial. PR libstdc++/86751 * include/bits/stl_pair.h (__nonesuch_no_braces): Remove. (__pair_base): New class with non-trivial copy assignment operator. (pair): Derive from __pair_base. Define copy assignment and move assignment operators as defaulted. * testsuite/20_util/pair/86751.cc: New test. Ville, this passes all our tests, but am I forgetting something that means this isn't right?
Attachment:
patch.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |