Title
`cache_latest_view` should be freestanding
Status
voting
Section
[version.syn][ranges.syn]
Submitter
Hewill Kang

Created on 2024-12-23.00:00:00 last changed 3 days ago

Messages

Date: 2025-02-07.22:26:49

Proposed resolution:

This wording is relative to N5001.

  1. Modify [version.syn] as indicated:

    #define __cpp_lib_ranges_cache_latest 202411L // freestanding, also in <ranges>
    
  2. Delete all "// freestanding" comments in [ranges.syn], header <ranges> synopsis, and then modify as indicated:

    // mostly freestanding
    #include <compare>              // see [compare.syn]
    #include <initializer_list>     // see [initializer.list.syn]
    #include <iterator>             // see [iterator.synopsis]
    
    […]
    namespace std::ranges {
      // [range.elementsof], class template elements_of
      template<range R, class Allocator = allocator<byte>>
        struct elements_of;  // hosted
      […]
    
      // [range.istream], istream view
      template<movable Val, class CharT, class Traits = char_traits<CharT>>
        requires see below
      class basic_istream_view;  // hosted
      template<class Val>
        using istream_view = basic_istream_view<Val, char>;   // hosted
      template<class Val>
        using wistream_view = basic_istream_view<Val, wchar_t>;   // hosted
    
      namespace views {
        template<class T> constexpr unspecified istream = unspecified; // hosted
      }
      […]
    }
    […]
    
Date: 2025-02-15.00:00:00

[ 2025-02-07; Reflector poll ]

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

Date: 2025-01-15.00:00:00

[ 2025-01-04; Tim Song suggests alternative wording ]

While we are here, we can use the new convention from P2407 to dramatically simplify <ranges>. Most future additions to this header should have no problem being freestanding, so that is the right default.

Date: 2025-01-25.13:30:23

`cache_latest_view` can be freestanding, but this never comes up in the discussion, which seems to be an oversight.

This wording is relative to N5001.

  1. Modify [version.syn] as indicated:

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

    #include <compare>              // see [compare.syn]
    #include <initializer_list>     // see [initializer.list.syn]
    #include <iterator>             // see [iterator.synopsis]
    
    namespace std::ranges {
      […]
      // [range.cache.latest], cache latest view
      template<input_range V>
        requires view<V>
      class cache_latest_view;                                                                // freestanding
      
      namespace views { inline constexpr unspecified cache_latest = unspecified; }            // freestanding
      […]
    }
    
History
Date User Action Args
2025-02-07 22:49:15adminsetstatus: ready -> voting
2025-02-07 22:26:49adminsetmessages: + msg14617
2025-02-07 22:26:49adminsetstatus: new -> ready
2025-01-25 13:30:23adminsetmessages: + msg14545
2025-01-18 13:28:20adminsetmessages: + msg14535
2024-12-23 00:00:00admincreate