swap
for propagate_const
should call member swap
Section: 3.7.10 [fund.ts.v2::propagate_const.algorithms] Status: TS Submitter: Tim Song Opened: 2015-07-08 Last modified: 2017-07-30
Priority: 3
View all issues with TS status.
Discussion:
Addresses: fund.ts.v2
For consistency with the rest of the standard library, the non-member swap
for propagate_const
should
call member swap
.
[2015-07, Telecon]
Both P3 and NAD were suggested.
[2016-02-20, Ville comments]
Feedback from an implementation:
The implementation ofpropagate_const
in libstdc++ calls propagate_const
's
member swap
from the non-member swap
.
[2016-11-08, Issaquah]
Adopted during NB comment resolution
Proposed resolution:
This wording is relative to N4529.
Edit [propagate_const.algorithms] as indicated:
-1- template <class T> constexpr void swap(propagate_const<T>& pt1, propagate_const<T>& pt2) noexcept(see below)-2- The constant-expression in the exception-specification is
-3- Effects:noexcept(
.swap(pt1.t_, pt2.t_)pt1.swap(pt2)).
swap(pt1.t_, pt2.t_)pt1.swap(pt2)