diff --git a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp --- a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp +++ b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp @@ -22,26 +22,49 @@ // Doesn't derive from view_base struct Empty { }; static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); // Derives from view_base, but privately struct PrivateViewBase : private std::ranges::view_base { }; static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); // Derives from view_base, but specializes enable_view to false struct EnableViewFalse : std::ranges::view_base { }; namespace std::ranges { template <> constexpr bool enable_view = false; } static_assert(!std::ranges::enable_view); - +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); // Derives from view_base struct PublicViewBase : std::ranges::view_base { }; static_assert(std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); // Does not derive from view_base, but specializes enable_view to true struct EnableViewTrue { }; namespace std::ranges { template <> constexpr bool enable_view = true; } static_assert(std::ranges::enable_view); - +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); +static_assert(!std::ranges::enable_view); // Make sure that enable_view is a bool, not some other contextually-convertible-to-bool type. ASSERT_SAME_TYPE(decltype(std::ranges::enable_view), const bool);