Title
"Effects: Equivalent to return" in [span.elem]
Status
wp
Section
[span.elem]
Submitter
Arthur O'Dwyer

Created on 2023-11-09.00:00:00 last changed 7 months ago

Messages

Date: 2024-04-02.10:29:12

Proposed resolution:

This wording is relative to N4964.

  1. 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: return data_;.

Date: 2024-04-02.10:29:12

[ Tokyo 2024-03-23; Status changed: Voting → WP. ]

Date: 2024-03-15.00:00:00

[ 2024-03-11; Reflector poll ]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Date: 2023-11-09.00:00:00

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
2024-04-02 10:29:12adminsetmessages: + msg14035
2024-04-02 10:29:12adminsetstatus: voting -> wp
2024-03-18 09:32:04adminsetstatus: ready -> voting
2024-03-11 21:35:03adminsetmessages: + msg13973
2024-03-11 21:35:03adminsetstatus: new -> ready
2023-11-18 12:33:42adminsetmessages: + msg13863
2023-11-09 00:00:00admincreate