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

4076. concat_view should be freestanding

Section: 17.3.2 [version.syn] Status: New Submitter: Hewill Kang Opened: 2024-04-21 Last modified: 2024-04-21

Priority: Not Prioritized

View other active issues in [version.syn].

View all other issues in [version.syn].

View all issues with New status.

Discussion:

concat_view can be freestanding, but this never seems to come up in the discussion, which seems to be an oversight.

[2024-04-21; Daniel comments]

The specification of some member functions of concat_view seem to depend on freestanding-deleted get overloads for variant, but so does join_with_view, which is marked as freestanding, so it does not seem to be a good reason to accept join_with_view but not concat_view as freestanding.

Proposed resolution:

This wording is relative to N4981.

  1. Modify 17.3.2 [version.syn] as indicated:

    #define __cpp_lib_ranges_concat 202403L // freestanding, also in <ranges>
    
  2. Modify 26.2 [ranges.syn] as indicated:

    #include <compare>              // see 17.11.1 [compare.syn]
    #include <initializer_list>     // see 17.10.2 [initializer.list.syn]
    #include <iterator>             // see 25.2 [iterator.synopsis]
    
    namespace std::ranges {
      […]
      // 26.7.18 [range.concat], concat view
      template<input_range... Views>
        requires see below
      class concat_view;                                                                // freestanding
      
      namespace views { inline constexpr unspecified concat = unspecified; }            // freestanding
      […]
    }