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.