Title
basic_string::at should not have a Requires clause
Status
c++14
Section
[string.access]
Submitter
Nevin Liber

Created on 2012-10-26.00:00:00 last changed 131 months ago

Messages

Date: 2013-04-18.22:58:13

Proposed resolution:

This wording is relative to N3376.

  1. Remove [string.access] p5:

    const_reference at(size_type pos) const;
    reference at(size_type pos);
    

    -5- Requires: pos < size()

    -6- Throws: out_of_range if pos >= size().

    -7- Returns: operator[](pos).

Date: 2013-04-15.00:00:00

[ 2013-04-18, Bristol ]

Date: 2013-03-15.00:00:00

[ 2013-03-15 Issues Teleconference ]

Moved to Review.

While this could simply move to Ready on inspection, there is concern that this will not be the only such case. Alisdair volunteers to review clause 21/23 for more of such issues for Bristol, and update the proposed resolution as necessary.

Date: 2013-01-15.00:00:00

[ 2013-01-17, Juan Soulie comments ]

This issue would also apply to every member function of basic_string that throws out_of_range, and to some cases where a length_error can be thrown.

Date: 2012-10-26.00:00:00

basic_string::at() has a wide contract and should not have a "Requires" clause on it.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-04-25 19:07:07adminsetstatus: voting -> wp
2013-04-19 21:44:50adminsetstatus: ready -> voting
2013-04-18 22:58:13adminsetmessages: + msg6461
2013-04-18 22:58:13adminsetstatus: review -> ready
2013-03-18 14:33:00adminsetmessages: + msg6423
2013-03-18 13:02:36adminsetstatus: new -> review
2013-03-12 20:38:59adminsetmessages: + msg6382
2012-11-01 21:04:29adminsetmessages: + msg6228
2012-10-26 00:00:00admincreate