Created on 2026-04-19.00:00:00 last changed 2 weeks ago
Proposed resolution:
This wording is relative to N5032.
Modify [view.interface] as indicated:
namespace std::ranges {
template<class D>
requires is_class_v<D> && same_as<D, remove_cv_t<D>>
class view_interface {
[…]
public:
[…]
constexpr auto cbegin() requires input_range<D> && (!simple-view<D>) {
return ranges::cbegin(derived());
}
constexpr auto cbegin() const requires input_range<const D> {
return ranges::cbegin(derived());
}
constexpr auto cend() requires input_range<D> && (!simple-view<D>) {
return ranges::cend(derived());
}
constexpr auto cend() const requires input_range<const D> {
return ranges::cend(derived());
}
[…]
};
}
The `view_interface` can provide only a const `cbegin` member when the derived class is
simple-view, which helps reduce template instantiation.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2026-05-01 10:39:10 | admin | set | messages: + msg16287 |
| 2026-04-19 00:00:00 | admin | create | |