Created on 2023-11-09.00:00:00 last changed 1 week ago
Proposed resolution:
This wording is relative to N4964.
Modify [span.elem] as indicated:
constexpr reference operator[](size_type idx) const;
-1- Preconditions: idx < size() is true.
-2-EffectsReturns:Equivalent to:return*(data() + idx);. -?- Throws: Nothing.
constexpr reference front() const;
-3- Preconditions: empty() is false.
-4-EffectsReturns:Equivalent to:return*data();. -?- Throws: Nothing.
constexpr reference back() const;
-5- Preconditions: empty() is false.
-6-EffectsReturns:Equivalent to:return*(data() + (size() - 1));. -?- Throws: Nothing.
constexpr pointer data() const noexcept;
-7-
EffectsReturns:Equivalent to:returndata_;.
In reviewing the wording for P2821 span.at(), it had been noticed that [span.elem] uses a lot of "Effects: Equivalent to return […];" which could be simply "Returns: […]".
For comparison, [string.view.access] uses "Returns: ..." instead, so I suggest that [span.elem] should be consistent with that.History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-18 12:33:42 | admin | set | messages: + msg13863 |
2023-11-09 00:00:00 | admin | create |