Title
Redundant paragraph about expression variations
Status
wp
Section
[range.range]
Submitter
Johel Ernesto Guerrero Peña

Created on 2023-04-01.00:00:00 last changed 17 months ago

Messages

Date: 2023-06-19.14:50:03

Proposed resolution:

This wording is relative to N4944.

  1. Modify [ranges.syn] as indicated:

    -1- The range concept defines the requirements of a type that allows iteration over its elements by providing an iterator and sentinel that denote the elements of the range.

    template<class T>
      concept range =
        requires(T& t) {
          ranges::begin(t); // sometimes equality-preserving (see below)
          ranges::end(t);
        };
    
    -2- The required expressions ranges::begin(t) and ranges::end(t) of the range concept do not require implicit expression variations ([concepts.equality]).

    -3- […]

Date: 2023-06-17.00:00:00

[ 2023-06-17 Approved at June 2023 meeting in Varna. Status changed: Voting → WP. ]

Date: 2023-05-15.00:00:00

[ 2023-05-24; Reflector poll ]

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

Date: 2023-04-01.00:00:00

Originally editorial issue Editorial issue #4431.

Expression variations kick in for "an expression that is non-modifying for some constant lvalue operand", but std::ranges::range's is an non-constant lvalue, so [range.range] p2 is redundant.

I suppose that the change that clarified the template parameters' cv-qualification for purposes of equality-preservation and requiring additional variations happened concurrently with the change of std::ranges::range's operand from a forwarding reference to a non-constant lvalue reference.

History
Date User Action Args
2023-06-19 14:50:03adminsetmessages: + msg13653
2023-06-19 14:50:03adminsetstatus: voting -> wp
2023-06-12 08:52:25adminsetstatus: ready -> voting
2023-05-24 14:13:41adminsetmessages: + msg13562
2023-05-24 14:13:41adminsetstatus: new -> ready
2023-04-02 15:56:27adminsetmessages: + msg13508
2023-04-01 00:00:00admincreate