This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of WP status.
3927. Unclear preconditions foroperator[]
for sequence containers
Section: 23.2.4 [sequence.reqmts] Status: WP Submitter: Ville Voutilainen Opened: 2023-04-24 Last modified: 2023-11-22
Priority: Not Prioritized
View other active issues in [sequence.reqmts].
View all other issues in [sequence.reqmts].
View all issues with WP status.
Discussion:
In 23.2.4 [sequence.reqmts]/118, we specify what a[n]
means for a sequence container a
, but we don't state that it actually has preconditions, other than implied ones.
[2023-05-24; Reflector poll]
Set status to Tentatively Ready after six votes in favour during reflector poll.
[2023-06-17 Approved at June 2023 meeting in Varna. Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4944.
Modify 23.2.4 [sequence.reqmts] as indicated:
a[n]-118- Result:
-119- Returns Effects: Equivalent to:reference
;const_reference
for constanta
return *(a.begin() + n) ;
-120- Remarks: Required forbasic_string
,array
,deque
, andvector
.
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