A RetroSearch Logo

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

Search Query:

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

Associative erase should return an iterator

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

451. Associative erase should return an iterator

Section: 23.2.7 [associative.reqmts], 23.4 [associative] Status: Dup Submitter: Bill Plauger Opened: 2004-01-30 Last modified: 2016-01-28

Priority: Not Prioritized

View other active issues in [associative.reqmts].

View all other issues in [associative.reqmts].

View all issues with Dup status.

Duplicate of: 130

Discussion:

map/multimap/set/multiset have:

    void erase(iterator);
    void erase(iterator, iterator);

But there's no good reason why these can't return an iterator, as for vector/deque/list:

    iterator erase(iterator);
    iterator erase(iterator, iterator);

Proposed resolution:

Informally: The table of associative container requirements, and the relevant template classes, should return an iterator designating the first element beyond the erased subrange.

Rationale:


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