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.
view_interface::cbeginSection: 25.5.3 [view.interface] Status: New Submitter: Hewill Kang Opened: 2026-04-19 Last modified: 2026-05-01
Priority: Not Prioritized
View all other issues in [view.interface].
View all issues with New status.
Discussion:
The view_interface can provide only a const cbegin member when the derived class is
simple-view, which helps reduce template instantiation.
Proposed resolution:
This wording is relative to N5032.
Modify 25.5.3 [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());
}
[…]
};
}