Title
[fund.ts.v2] Non-member swap for propagate_const should call member swap
Status
open
Section
[propagate_const.algorithms]
Submitter
Tim Song

Created on 2015-07-08.00:00:00 last changed 81 months ago

Messages

Date: 2016-11-20.18:55:07

Proposed resolution:

This wording is relative to N4529.

  1. 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 noexcept(swap(pt1.t_, pt2.t_)pt1.swap(pt2)).

    -3- Effects: swap(pt1.t_, pt2.t_)pt1.swap(pt2).

Date: 2016-11-15.00:00:00

[ 2016-11-08, Issaquah ]

Adopted during NB comment resolution

Date: 2016-02-15.00:00:00

[ 2016-02-20, Ville comments ]

Feedback from an implementation:

The implementation of propagate_const in libstdc++ calls propagate_const's member swap from the non-member swap.

Date: 2017-02-02.00:41:18

[ 2015-07, Telecon ]

Both P3 and NAD were suggested.

Date: 2015-07-08.00:00:00

Addresses: fund.ts.v2

For consistency with the rest of the standard library, the non-member swap for propagate_const should call member swap.

History
Date User Action Args
2017-07-30 20:10:41adminsetstatus: wp -> open
2016-11-20 18:55:07adminsetmessages: + msg8646
2016-11-20 18:55:07adminsetstatus: new -> wp
2016-02-20 20:46:37adminsetmessages: + msg7981
2015-09-27 20:55:06adminsetmessages: + msg7558
2015-07-12 12:59:33adminsetmessages: + msg7482
2015-07-08 00:00:00admincreate