Title
a.erase(q1, q2) unable to directly return q2
Status
c++14
Section
[associative.reqmts]
Submitter
Geoff Alexander

Created on 2013-05-11.00:00:00 last changed 131 months ago

Messages

Date: 2014-02-14.16:49:03

Proposed resolution:

  1. In the specification of a.erase(q1, q2) in sub-clause [associative.reqmts], Table 102 change as indicated:

    Table 102 — Associative container requirements (in addition to container) (continued)
    Expression Return type Assertion/note pre-/post-condition Complexity
    a.erase(q1, q2) iterator erases all the elements in the range [q1,q2). Returns q2 an iterator pointing to the element pointed to by q2 prior to any elements being erased. If no such element exists, a.end() is returned. log(a.size()) + N where N has the value distance(q1, q2).
Date: 2014-02-12.00:00:00

[ 2014-02-12 Issaquah meeting ]

Move a Immediate.

Date: 2013-09-26.18:26:05

[ 2013-09 Chicago (evening issues group) ]

The wording looks good, but is worded slightly differently to how we say the same for sequence containers, and for unordered associative containers. We should apply consistent wording in all three cases.

Alisdair to provide the wording.

Date: 2013-05-11.00:00:00

Section [associative.reqmts], Table 102, page 743 of the C++ 2011 Standard states that a.erase(q1, q2) returns q2. The problem is that a.erase(q1, q2) cannot directly return q2 as the return type, iterator, differs from that of q2, const_iterator.

History
Date User Action Args
2014-02-28 13:44:27adminsetstatus: wp -> c++14
2014-02-20 13:52:38adminsetstatus: immediate -> wp
2014-02-14 16:49:03adminsetmessages: + msg6864
2014-02-14 16:49:03adminsetstatus: new -> immediate
2013-09-26 18:26:05adminsetmessages: + msg6637
2013-06-29 14:01:22adminsetmessages: + msg6528
2013-05-11 00:00:00admincreate