A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue482 below:

Issue 482: Swapping pairs

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

482. Swapping pairs

Section: 22.3 [pairs], 22.4 [tuple] Status: Resolved Submitter: Andrew Koenig Opened: 2004-09-14 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [pairs].

View all issues with Resolved status.

Discussion:

(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).

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

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

Proposed resolution:

Wording provided in N1856.

Rationale:

Recommend NAD Resolved, fixed by N1856.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4