Created on 2022-09-08.00:00:00 last changed 24 months ago
Proposed resolution:
This wording is relative to n4917.
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.as.const], as const view template<input_range R> constexpr auto& possibly-const-range(R& r) { // exposition only if constexpr (constant_range<const R> && !constant_range<R>) { return const_cast<const R&>(r); } else { return r; } } […] }
[ 2022-11-30 LWG telecon. Status changed: Tentatively NAD → NAD. ]
[ 2022-09-23; Reflector poll ]
Tentatively NAD. "const output ranges don’t seem to be useful."
Due to the possibly-const-range constraint that the template parameter R must model input_range, this makes the ranges::cend that tries using it for meaningful const casting never be applied to an output_range, even though const_sentinel does not require the template parameter S to model input_iterator.
This is unnecessary, we should relax its constraint.History | |||
---|---|---|---|
Date | User | Action | Args |
2022-11-30 17:59:24 | admin | set | messages: + msg13140 |
2022-09-23 15:43:32 | admin | set | messages: + msg12791 |
2022-09-23 15:43:32 | admin | set | status: new -> nad |
2022-09-08 06:56:08 | admin | set | messages: + msg12750 |
2022-09-08 00:00:00 | admin | create |