Movatterモバイル変換


[0]ホーム

URL:



This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++14 status.

2207.basic_string::at should not have a Requires clause

Section: 27.4.3.6[string.access]Status:C++14Submitter: Nevin LiberOpened: 2012-10-26Last modified: 2016-01-28

Priority:Not Prioritized

View all otherissues in [string.access].

View all issues withC++14 status.

Discussion:

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

[2013-01-17, Juan Soulie comments]

This issue would also apply to every member function ofbasic_string that throwsout_of_range, and to some cases where alength_error can be thrown.

[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 theonly such case. Alisdair volunteers to review clause 21/23 for more of such issues for Bristol,and update the proposed resolution as necessary.

[2013-04-18, Bristol]

Proposed resolution:

This wording is relative to N3376.

  1. Remove 27.4.3.6[string.access] p5:

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

    -5-Requires:pos < size()

    -6-Throws:out_of_range ifpos >= size().

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


[8]ページ先頭

©2009-2026 Movatter.jp