This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.

3302. Range adaptor objects keys and values are unspecified

Section: 26.2 [ranges.syn] Status: C++20 Submitter: Michel Morin Opened: 2019-10-04 Last modified: 2021-02-25

Priority: 1

View other active issues in [ranges.syn].

View all other issues in [ranges.syn].

View all issues with C++20 status.


This issue was submitted as editorial issue cplusplus/draft#3231 but had been classified as non-editorial.

keys and values are listed in 26.2 [ranges.syn], but not specified. It seems that P1035R7 forgot to specify them (as elements<0> and elements<1>).

[2019-10-31 Issue Prioritization]

Priority to 1 after reflector discussion.

[2019-11 Wednesday night issue processing in Belfast.]

Status to Ready.

Proposed resolution:

This wording is relative to N4830.

  1. Modify 26.2 [ranges.syn], header <ranges> synopsis, as indicated:

    namespace std::ranges {
      template<class R>
        using keys_view = elements_view<all_view<R>, 0>;
      template<class R>
        using values_view = elements_view<all_view<R>, 1>;
      namespace views {
        template<size_t N>
          inline constexpr unspecified elements = unspecified;
        inline constexpr autounspecified keys = elements<0>unspecified;
        inline constexpr autounspecified values = elements<1>unspecified;