Section: 22.214.171.124.9 [util.smartptr.shared.spec] Status: CD1 Submitter: Howard Hinnant Opened: 2007-10-10 Last modified: 2016-01-28 10:19:27 UTC
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 126.96.36.199 [util.smartptr.shared]:
void swap(shared_ptr& r); ... template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);
Change 188.8.131.52.5 [util.smartptr.shared.mod]:
void swap(shared_ptr& r);
Change 184.108.40.206.9 [util.smartptr.shared.spec]:
template<class T> void swap(shared_ptr<T>& a, shared_ptr<T>& b);