//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // UNSUPPORTED: c++03, c++11, c++14, c++17 // class std::ranges::subrange; #include #include #include "test_macros.h" #include "test_iterators.h" template concept ValidSubrangeKind = requires { typename std::ranges::subrange; }; template concept ValidSubrange = requires { typename std::ranges::subrange; }; static_assert( ValidSubrange>); static_assert( ValidSubrange, forward_iterator>); static_assert( ValidSubrangeKind, forward_iterator>); static_assert( ValidSubrangeKind, forward_iterator>); // Wrong sentinel type. static_assert(!ValidSubrange, int*>); static_assert( ValidSubrange); static_assert( ValidSubrange); // Must be sized. static_assert(!ValidSubrangeKind); static_assert( ValidSubrangeKind); // Wrong sentinel type. static_assert(!ValidSubrange>); // Not an iterator. static_assert(!ValidSubrange);