Created on 2023-01-24.00:00:00 last changed 13 months ago
Proposed resolution:
This wording is relative to N4928.
Modify [ranges.syn], header <ranges> synopsis, as indicated:
#include <compare> // see [compare.syn] #include <initializer_list> // see [initializer.list.syn] #include <iterator> // see [iterator.synopsis] namespace std::ranges { […] template<range R> using range_reference_t = iter_reference_t<iterator_t<R>>; // freestanding template<range R> using range_const_reference_t = iter_const_reference_t<iterator_t<R>>; // freestanding template<range R> using range_rvalue_reference_t = iter_rvalue_reference_t<iterator_t<R>>; // freestanding template<range R> using range_common_reference_t = iter_common_reference_t<iterator_t<R>>; // freestanding […] }
[ 2023-02-13 Approved at February 2023 meeting in Issaquah. Status changed: Voting → WP. ]
[ 2023-02-06; Reflector poll ]
Set status to Tentatively Ready after seven votes in favour during reflector poll.
For the alias template iter_meow_t in <iterator>, there are almost all corresponding range_meow_t in <ranges>, except for iter_common_reference_t, which is used to calculate the common reference type shared by reference and value_type of the iterator.
Given that it has a highly similar formula form to iter_const_reference_t, and the latter has a corresponding sibling, I think we should add a range_common_reference_t for <ranges>. This increases the consistency of the two libraries and simplifies the text of getting common reference from a range. Since C++23 brings proxy iterators and tuple enhancements, I believe such introduction can bring some value.History | |||
---|---|---|---|
Date | User | Action | Args |
2023-11-22 15:47:43 | admin | set | status: wp -> c++23 |
2023-02-13 10:17:57 | admin | set | messages: + msg13374 |
2023-02-13 10:17:57 | admin | set | status: voting -> wp |
2023-02-06 15:33:48 | admin | set | status: ready -> voting |
2023-02-06 15:13:50 | admin | set | messages: + msg13266 |
2023-02-06 15:13:50 | admin | set | status: new -> ready |
2023-01-28 12:54:17 | admin | set | messages: + msg13221 |
2023-01-24 00:00:00 | admin | create |