A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue104 below:

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

This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD status.

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

Section: 27.4.3.5 [string.capacity] Status: NAD Submitter: AFNOR Opened: 1998-10-07 Last modified: 2016-01-28

Priority: Not Prioritized

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.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4