operator[]
for sequence containersSection: 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-reference
;const_reference
for constanta
ReturnsEffects: Equivalent to:return *(a.begin() + n);
-120- Remarks: Required forbasic_string
,array
,deque
, andvector
.