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 // REQUIRES: has-unix-headers
10 // UNSUPPORTED: c++03, c++11, c++14, c++17
11 // REQUIRES: libcpp-hardening-mode={{extensive|debug}}
12 // XFAIL: libcpp-hardening-mode=debug && availability-verbose_abort-missing
13 
14 // <ranges>
15 
16 // friend constexpr bool operator==(const inner-iterator& x, default_sentinel_t);
17 //
18 // Can't compare a default-constructed `inner-iterator` with the default sentinel.
19 
20 #include <ranges>
21 
22 #include "check_assertion.h"
23 #include "../types.h"
24 
main(int,char **)25 int main(int, char**) {
26   {
27     InnerIterForward i;
28     TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
29   }
30 
31   {
32     InnerIterInput i;
33     TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
34   }
35 
36   return 0;
37 }
38