libstdc++: Fix move construction of std::tuple with array elements [PR101960]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 19 Aug 2021 10:48:40 +0000 (11:48 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 19 Aug 2021 12:02:12 +0000 (13:02 +0100)
commit0187e0d7360f327f88d8b2294668669306ae4630
tree1ce16d446e1ae3cd5b0761c82978f97a7e1a9928
parent926d4a71c7e5a2f7d17a4f943d6e7fe9f1e3ba55
libstdc++: Fix move construction of std::tuple with array elements [PR101960]

An array member cannot be direct-initialized in a ctor-initializer-list,
so use the base class' move constructor, which does the right thing for
both arrays and non-arrays.

This constructor could be defaulted, but that would make it trivial for
some specializations, which would change the argument passing ABI. Do
that for the versioned namespace only.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101960
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base
class' move constructor. Define as defaulted for versioned
namespace.
* testsuite/20_util/tuple/cons/101960.cc: New test.
libstdc++-v3/include/std/tuple
libstdc++-v3/testsuite/20_util/tuple/cons/101960.cc [new file with mode: 0644]