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
11 // <regex>
12
13 // class regex_token_iterator<BidirectionalIterator, charT, traits>
14
15 // bool operator==(default_sentinel_t) const { return *this == regex_iterator(); } // since C++20
16
17 #include <cassert>
18 #include <iterator>
19 #include <regex>
20
21 #include "test_comparisons.h"
22
main(int,char **)23 int main(int, char**) {
24 AssertEqualityReturnBool<std::cregex_iterator>();
25
26 {
27 std::cregex_iterator i;
28 assert(testEquality(i, std::default_sentinel, true));
29 }
30
31 AssertEqualityReturnBool<std::sregex_token_iterator>();
32
33 {
34 std::sregex_token_iterator i;
35 assert(testEquality(i, std::default_sentinel, true));
36 }
37
38 return 0;
39 }
40