This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of CD1 status.
Section: 184.108.40.206 [util.smartptr.shared.spec] Status: CD1 Submitter: Howard Hinnant Opened: 2007-10-10 Last modified: 2016-02-10
Priority: Not Prioritized
View all issues with CD1 status.
When the LWG looked at 674 in Kona the following note was made:
We may need to open an issue to deal with the question of whether shared_ptr needs an rvalue swap.
This issue was opened in response to that note.
I believe allowing rvalue shared_ptrs to swap is both appropriate, and consistent with how other library components are currently specified.
[ Bellevue: ]
Concern that the three signatures for swap is needlessly complicated, but this issue merely brings shared_ptr into equal complexity with the rest of the library. Will open a new issue for concern about triplicate signatures.
Adopt issue as written.
Change the synopsis in 20.11.3 [util.smartptr.shared]:
void swap(shared_ptr& r); ... template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);
Change 220.127.116.11 [util.smartptr.shared.mod]:
void swap(shared_ptr& r);
Change 18.104.22.168 [util.smartptr.shared.spec]:
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);