Debian Codegraph @

libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/equal.pass.cpp

raw
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: no-filesystem
11
12 // <filesystem>
13
14 // class recursive_directory_iterator
15
16 // bool operator==(default_sentinel_t) const noexcept { // since C++20
17 // return *this == recursive_directory_iterator();
18 // }
19
20 #include <cassert>
21 #include <iterator>
22
23 #include <filesystem>
24 #include "test_comparisons.h"
25 namespace fs = std::filesystem;
26
27 int main(int, char**) {
28 AssertEqualityAreNoexcept<fs::recursive_directory_iterator>();
29 AssertEqualityReturnBool<fs::recursive_directory_iterator>();
30
31 fs::recursive_directory_iterator i;
32 assert(testEquality(i, std::default_sentinel, true));
33
34 return 0;
35 }