//===----------------------------------------------------------------------===// // // 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" using FI = forward_iterator; FI fi{nullptr}; int *ptr = nullptr; static_assert(std::same_as>); static_assert(std::same_as>); static_assert(std::same_as>); struct ForwardRange { forward_iterator begin() const; forward_iterator end() const; }; template<> inline constexpr bool std::ranges::enable_borrowed_range = true; struct SizedRange { int *begin(); int *end(); }; template<> inline constexpr bool std::ranges::enable_borrowed_range = true; static_assert(std::same_as>); static_assert(std::same_as>); static_assert(std::same_as>);