Title
pair and tuple copy and move constructor have backwards specification
Status
c++20
Section
[pairs.pair][tuple.cnstr]
Submitter
Richard Smith

Created on 2019-11-26.00:00:00 last changed 38 months ago

Messages

Date: 2019-12-08.18:39:21

Proposed resolution:

This wording is relative to N4835.

  1. Modify [pairs.pair] as indicated:

    -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 copymove and movecopy, respectively, would satisfy the requirements for a constexpr function.

  2. Modify [tuple.cnstr] as indicated:

    -3- The defaulted move and copy constructor, respectively, of tuple shall be a constexpr function if and only if all required element-wise initializations for copymove and movecopy, respectively, would satisfy the requirements for a constexpr function. The defaulted move and copy constructor of tuple<> shall be constexpr functions.

Date: 2019-12-08.00:00:00

[ 2019-12-08 Issue Prioritization ]

Status to Tentatively Ready and priority to 0 after ten positive votes on the reflector.

Date: 2019-12-15.00:00:00

[ 2019-12-01; Daniel comments and provides wording ]

These inverted wording effects are an unintended oversight caused by N3471.

Date: 2019-11-26.00:00:00

[pairs.pair] p2 and [tuple.cnstr] p3 say:

The defaulted move and copy constructor, respectively, of {pair,tuple} is 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.

Note that we specify the copy constructor in terms of element move operations and the move constructor in terms of element copy operations. Is that really the intent? This appears to be how this was originally specified when the wording was added by N3471.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2020-02-24 16:02:59adminsetstatus: voting -> wp
2020-01-17 04:54:50adminsetstatus: ready -> voting
2019-12-08 18:39:21adminsetmessages: + msg10873
2019-12-08 18:39:21adminsetstatus: new -> ready
2019-12-01 10:59:21adminsetmessages: + msg10856
2019-12-01 10:59:21adminsetmessages: + msg10855
2019-11-26 00:00:00admincreate