Title
Associative erase should return an iterator
Status
dup
Section
[associative.reqmts][associative]
Submitter
Bill Plauger

Created on 2004-01-30.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Rationale:

Duplicate: 130

Date: 2010-10-21.18:28:33

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.

Date: 2004-01-30.00:00:00

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);
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg2678
2010-10-21 18:28:33adminsetmessages: + msg2677
2004-01-30 00:00:00admincreate