104. Description of basic_string::operator[] is unclear

Section: 24.3.2.4 [string.capacity] Status: NAD Submitter: AFNOR Opened: 1998-10-07 Last modified: 2016-02-10

Priority: Not Prioritized

View other active issues in [string.capacity].

View all other issues in [string.capacity].

View all issues with NAD status.

Discussion:

It is not clear that undefined behavior applies when pos == size () for the non const version.

Proposed resolution:

Rewrite as: Otherwise, if pos > size () or pos == size () and the non-const version is used, then the behavior is undefined.

Rationale:

The Standard is correct. The proposed resolution already appears in the Standard.