Implement C++20 constexpr changes to std::pair (P1032R1)
authorJonathan Wakely <jwakely@redhat.com>
Thu, 26 Sep 2019 16:08:39 +0000 (17:08 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 26 Sep 2019 16:08:39 +0000 (17:08 +0100)
commit7a9942f52157987785e964fe602306d477d1885e
tree66954878a69708cc1f8758998654506c78e89378
parentd5f7e04923c5fe55db12e7da006c41c3853b4ddb
Implement C++20 constexpr changes to std::pair (P1032R1)

* include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
piecewise construction constructor, assignment operators, and swap.
* include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
Add _GLIBCXX20_CONSTEXPR.
(pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
* testsuite/20_util/pair/constexpr_assign.cc: New test.
* testsuite/20_util/pair/constexpr_swap.cc: New test.

From-SVN: r276154
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_pair.h
libstdc++-v3/include/std/tuple
libstdc++-v3/testsuite/20_util/pair/constexpr_assign.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/pair/constexpr_swap.cc [new file with mode: 0644]