912. Array swap needs to be conceptualized

Section: 27.7.3 [alg.swap] Status: NAD Concepts Submitter: Daniel Krügler Opened: 2008-10-01 Last modified: 2016-01-28 10:19:27 UTC

Priority: Not Prioritized

View all other issues in [alg.swap].

View all issues with NAD Concepts status.


With the adaption of 809 we have a new algorithm swap for C-arrays, which needs to be conceptualized.

[ Post Summit Daniel adds: ]

Recommend as NAD Editorial: The changes have already been applied to the WP N2800.

[ Batavia (2009-05): ]

Move to NAD; the changes have already been made.

Proposed resolution:

Replace in 27.7.3 [alg.swap] before p. 3 until p. 4 by

template <class ValueType T, size_t N>
requires Swappable<T>
void swap(T (&a)[N], T (&b)[N]);

Requires: T shall be Swappable.

Effects: swap_ranges(a, a + N, b);