https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100587
Bug ID: 100587 Summary: std::range::empty_view is not a view Product: gcc Version: 10.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de Target Milestone: --- The following snippet does not compile: ```c++ #include <ranges> static_assert(std::ranges::view<std::ranges::empty_view<int>); ``` https://godbolt.org/z/3qanzdrb5 The standard says that https://eel.is/c++draft/range.empty#overview-1: > empty_view produces a view of no elements of a particular type. empty_view is defined as inheriting from view_interface, the std::ranges::view expects an inheritance from view_base per default. Furthermore, https://eel.is/c++draft/ranges.syn does not specify > template<class T> > inline constexpr bool enable_view<empty_view<T>> = true; So I guess the standard is inconsistent here.