Section: 23.7.2.2.6 [span.elem] Status: WP Submitter: Arthur O'Dwyer Opened: 2023-11-09 Last modified: 2024-04-02
Priority: Not Prioritized
View all issues with WP status.
Discussion:
In reviewing the wording for P2821 span.at()
, it had been noticed that
23.7.2.2.6 [span.elem] uses a lot of "Effects: Equivalent to return […];" which
could be simply "Returns: […]".
[2024-03-11; Reflector poll]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
[Tokyo 2024-03-23; Status changed: Voting → WP.]
Proposed resolution:
This wording is relative to N4964.
Modify 23.7.2.2.6 [span.elem] as indicated:
constexpr reference operator[](size_type idx) const;
-1- Preconditions:
-2-idx < size()
istrue
.EffectsReturns:Equivalent to:. -?- Throws: Nothing.
return*(data() + idx);
constexpr reference front() const;
-3- Preconditions:
-4-empty()
isfalse
.EffectsReturns:Equivalent to:. -?- Throws: Nothing.
return*data();
constexpr reference back() const;
-5- Preconditions:
-6-empty()
isfalse
.EffectsReturns:Equivalent to:. -?- Throws: Nothing.
return*(data() + (size() - 1));
constexpr pointer data() const noexcept;
-7-
EffectsReturns:Equivalent to:.
returndata_;