A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4011 below:

Equivalent to return" in [span.elem]

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.

4011. "Effects: Equivalent to return" in [span.elem]

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: […]".

For comparison, 27.3.3.6 [string.view.access] uses "Returns: ..." instead, so I suggest that 23.7.2.2.6 [span.elem] should be consistent with that.

[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.

  1. Modify 23.7.2.2.6 [span.elem] as indicated:

    constexpr reference operator[](size_type idx) const;
    

    -1- Preconditions: idx < size() is true.

    -2- Effects Returns: Equivalent to: return *(data() + idx) ; . -?- Throws: Nothing.
    constexpr reference front() const;
    

    -3- Preconditions: empty() is false.

    -4- Effects Returns: Equivalent to: return *data() ; . -?- Throws: Nothing.
    constexpr reference back() const;
    

    -5- Preconditions: empty() is false.

    -6- Effects Returns: Equivalent to: return *(data() + (size() - 1)) ; . -?- Throws: Nothing.
    constexpr pointer data() const noexcept;
    

    -7- Effects Returns: Equivalent to: returndata_ ; .


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