1 //===----------------------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // UNSUPPORTED: c++03, c++11, c++14, c++17 10 // UNSUPPORTED: libcpp-has-no-incomplete-ranges 11 12 // sentinel() = default; 13 14 #include <ranges> 15 #include <cassert> 16 17 #include "test_macros.h" 18 #include "../types.h" 19 test()20constexpr bool test() { 21 using Sent = std::ranges::sentinel_t<std::ranges::iota_view<Int42<DefaultTo42>, IntComparableWith<Int42<DefaultTo42>>>>; 22 using Iter = std::ranges::iterator_t<std::ranges::iota_view<Int42<DefaultTo42>, IntComparableWith<Int42<DefaultTo42>>>>; 23 assert(Sent() == Iter()); 24 25 return true; 26 } 27 main(int,char **)28int main(int, char**) { 29 test(); 30 static_assert(test()); 31 32 return 0; 33 } 34