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: 22.2.3 [utility.exchange] Status: NAD Submitter: Alisdair Meredith Opened: 2013-09-22 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [utility.exchange].

View all issues with NAD status.

Discussion:

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 16.3.2.4 [structure.specifications]p4. There is no desire to redundantly repeat a set of requirements.

Proposed resolution: