Created on 2016-11-09.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4606.
Add a new paragraph after [pairs.pair] p2:
-2- The defaulted move and copy constructor, respectively, of pair shall be a constexpr function if and only if all required element-wise initializations for copy and move, respectively, would satisfy the requirements for a constexpr function. The destructor of pair shall be a trivial destructor if (is_trivially_destructible_v<T1> && is_trivially_destructible_v<T2>) is true.
Add a new paragraph after the class synopsis in [tuple.tuple]:
-?- The destructor of tuple shall be a trivial destructor if (is_trivially_destructible_v<Types> && ...) is true.
[ Issues Telecon 16-Dec-2016 ]
Move to Review; we think this is right, but are awaiting implementation experience.
[ 2016-11-09, Jonathan provides wording ]
Addresses US 109
tuple should be a literal type if its elements are literal types; it fails because the destructor is not necessarily trivial. It should follow the form of optional and variant, and mandate a trivial destructor if all types in Types... have a trivial destructor. It is not clear if pair has the same issue, as pair specifies data members first and second, and appears to have an implicitly declared and defined destructor. Suggested resolution: Document the destructor for tuple, and mandate that it is trivial if each of the elements in the tuple has a trivial destructor. Consider whether the same specification is needed for pair.History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2017-03-05 23:41:16 | admin | set | status: review -> wp |
2016-12-16 20:56:38 | admin | set | messages: + msg8726 |
2016-12-16 20:56:38 | admin | set | status: new -> review |
2016-11-09 22:18:13 | admin | set | messages: + msg8601 |
2016-11-09 22:18:13 | admin | set | messages: + msg8600 |
2016-11-09 00:00:00 | admin | create |