This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++23 status.
std::tuple<>
should be trivially constructibleSection: 22.4.4.2 [tuple.cnstr] Status: C++23 Submitter: Louis Dionne Opened: 2019-05-29 Last modified: 2023-11-22
Priority: 3
View other active issues in [tuple.cnstr].
View all other issues in [tuple.cnstr].
View all issues with C++23 status.
Discussion:
That requirement is really easy to enforce, and it has been requested by users (e.g. libc++ bug 41714).
Previous resolution [SUPERSEDED]:This wording is relative to N4810.
Modify 22.4.4.2 [tuple.cnstr] as indicated:
-4- If
is_trivially_destructible_v<Ti>
istrue
for allTi
, then the destructor oftuple
is trivial. The default constructor oftuple<>
is trivial.
[2020-02-13, Prague]
LWG discussion revealed that all where happy that we want this, except that the new wording should become a separate paragraph.
[2020-11-09 Approved In November virtual meeting. Status changed: Ready → WP.]
Proposed resolution:
This wording is relative to N4849.
Modify 22.4.4.2 [tuple.cnstr] as indicated:
-4- If
-?- The default constructor ofis_trivially_destructible_v<Ti>
istrue
for allTi
, then the destructor oftuple
is trivial.tuple<>
is trivial.