This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

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

Section: 23.2.3 [] Status: NAD Submitter: Alisdair Meredith Opened: 2013-09-22 Last modified: 2017-02-03

Priority: Not Prioritized

View all other issues in [].

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: