Title
Swapping pairs
Status
resolved
Section
[pairs] [tuple]
Submitter
Andrew Koenig

Created on 2004-09-14.00:00:00 last changed 162 months ago

Messages

Date: 2010-11-20.00:05:46

Rationale:

Recommend NADResolved, fixed by N1856.

Date: 2010-10-21.18:28:33

Proposed resolution:

Wording provided in N1856.

Date: 2010-10-21.18:28:33

[ Post Oxford: We got swap for pair but accidently missed tuple. tuple::swap is being tracked by 522. ]

Date: 2010-10-21.18:28:33

[ Lillehammer: We agree it should be swappable. Howard will provide wording. ]

Date: 2004-09-14.00:00:00

(Based on recent comp.std.c++ discussion)

Pair (and tuple) should specialize std::swap to work in terms of std::swap on their components. For example, there's no obvious reason why swapping two objects of type pair<vector<int>, list<double> > should not take O(1).

History
Date User Action Args
2010-11-19 19:04:45adminsetstatus: nad editorial -> resolved
2010-10-21 18:28:33adminsetmessages: + msg2799
2010-10-21 18:28:33adminsetmessages: + msg2798
2010-10-21 18:28:33adminsetmessages: + msg2797
2010-10-21 18:28:33adminsetmessages: + msg2796
2004-09-14 00:00:00admincreate