2297. [CD] Missing type requirements for std::exchange

Section: 22.2.3 [utility.exchange] Status: NAD Submitter: Alisdair Meredith Opened: 2013-09-22 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View all other issues in [utility.exchange].

View all issues with NAD status.


Addresses GB 5

The wording describes example code including the call of a move constructor, but there is no requirement stated that T be move constructible.

We would like to add a new Para 1 before existing paragraph:

Requires: Type T shall be MoveConstructible (Table 20) and MoveAssignable (Table 22).

However the MoveAssignable concept currently does not cover cases where the source and destination types may differ.

[2013-09 Chicago]

The requirements are implicit according to [structure.specifications]p4. There is no desire to redundantly repeat a set of requirements.

Proposed resolution: