//===----------------------------------------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // REQUIRES: std-at-least-c++26 // // template class optional::iterator; // template class optional::const_iterator; // template // constexpr bool ranges::enable_borrowed_range> = true; #include #include #include template void borrowed_range() { static_assert(std::ranges::enable_borrowed_range>); static_assert(std::ranges::range> == std::ranges::borrowed_range>); } void test_borrowed_range() { borrowed_range(); borrowed_range(); borrowed_range(); borrowed_range(); borrowed_range(); }