diff options
author | Patrick Palka <ppalka@redhat.com> | 2022-08-24 16:38:45 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2022-08-24 16:38:45 -0400 |
commit | f46f58e61db3b1e71beb21443c0ca9387bc836e2 (patch) | |
tree | 076b8e305f025c5d2a86f8ffe71e79340c507746 /gcc | |
parent | df5204ddd4b8e3a2d02bb3ad5bcdb9d636b02537 (diff) | |
download | gcc-f46f58e61db3b1e71beb21443c0ca9387bc836e2.zip gcc-f46f58e61db3b1e71beb21443c0ca9387bc836e2.tar.gz gcc-f46f58e61db3b1e71beb21443c0ca9387bc836e2.tar.bz2 |
libstdc++: Fix fallout from P2321R2 std::pair/tuple enhancements
r13-2159-g72886fcc626953 caused some testsuite regressions in C++23 mode:
FAIL: 20_util/pair/requirements/explicit_instantiation/1.cc (test for excess errors)
FAIL: 20_util/tuple/53648.cc (test for excess errors)
FAIL: 20_util/tuple/cons/noexcept_specs.cc (test for excess errors)
FAIL: 20_util/tuple/requirements/explicit_instantiation.cc (test for excess errors)
The test noexcept_specs.cc just needs to be updated to consider the
additional converting constructors of tuple in C++23 mode, which happen
to improve constructing from a const tuple rvalue that has an rvalue
reference element (for the better, as far as I can tell).
The other three tests fail because they explicitly instantiate a
specialization of pair/tuple whose elements are not all const swappable,
which in C++23 mode now results in a hard error due to the new const
swap member function. Rather than XFAILing the tests in C++23 mode,
this patch adds non-standard constraints to this member function so that
we continue to accept such explicit instantiations.
libstdc++-v3/ChangeLog:
* include/bits/stl_pair.h (pair::swap const): Add non-standard
is_swappable_v constraints.
* include/std/tuple (tuple::swap const): Likewise.
* testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
asserts in C++23 mode.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions