Title
String exception inconsistency in erase.
Status
c++14
Section
[string.require]
Submitter
José Daniel García Sánchez

Created on 2010-10-21.00:00:00 last changed 131 months ago

Messages

Date: 2014-02-14.16:49:03

Proposed resolution:

Remove [string.require]p/3:

3 No erase() or pop_back() member function shall throw any exceptions.

Add to the specifications of iterator erase(const_iterator p);, iterator erase(const_iterator first, const_iterator last);, and void pop_back(); in [string.erase]:

Throws: Nothing

Date: 2014-02-13.00:00:00

[ 2014-02-13 Issaquah meeting ]

Move as Immmediate

Date: 2014-02-12.00:00:00

[ 2014-02-12 Issaquah meeting ]

Jeffrey: Madrid meeting's proposed wording wasn't applied, and it's better than the original proposed wording. However, this sentence is only doing 3 functions' worth of work, unlike the similar paragraphs in [container.requirements.general]. Suggest just putting "Throws: Nothing" on the 3 functions.

Date: 2011-03-24.00:00:00

[ 2011-03-24 Madrid meeting ]

Beman: Don't want to just change this, can we just say "unless otherwise specified"?

Alisdair: Leave open, but update proposed resolution to say something like "unless otherwise specified".

General agreement that it should be corrected but not a stop-ship.

Action: Update proposed wording for issue 2003 as above, but leave Open.

Date: 2010-10-21.00:00:00

Clause 21.4.1 [string.require]p3 states:

No erase() or pop_back() member function shall throw any exceptions.

However in 21.4.6.5 [string.erase] p2 the first version of erase has

Throws: out_of_range if pos > size().

History
Date User Action Args
2014-02-27 17:03:20adminsetstatus: wp -> c++14
2014-02-20 13:52:38adminsetstatus: immediate -> wp
2014-02-14 16:49:03adminsetmessages: + msg6862
2014-02-14 16:49:03adminsetstatus: open -> immediate
2014-02-13 04:51:13adminsetmessages: + msg6820
2011-03-24 16:58:37adminsetmessages: + msg5686
2010-11-13 23:03:59adminsetstatus: new -> open
2010-10-26 20:16:35adminsetmessages: + msg5154
2010-10-21 00:00:00admincreate