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 |
10 | // UNSUPPORTED: availability-filesystem-missing |
11 | |
12 | // <filesystem> |
13 | |
14 | #include <filesystem> |
15 | namespace fs = std::filesystem; |
16 | using namespace fs; |
17 | |
18 | struct ConvToPath { |
19 | operator fs::path() const { |
20 | return "" ; |
21 | } |
22 | }; |
23 | |
24 | int main(int, char**) { |
25 | ConvToPath LHS, RHS; |
26 | (void)(LHS == RHS); // expected-error {{invalid operands to binary expression}} |
27 | (void)(LHS != RHS); // expected-error {{invalid operands to binary expression}} |
28 | (void)(LHS < RHS); // expected-error {{invalid operands to binary expression}} |
29 | (void)(LHS <= RHS); // expected-error {{invalid operands to binary expression}} |
30 | (void)(LHS > RHS); // expected-error {{invalid operands to binary expression}} |
31 | (void)(LHS >= RHS); // expected-error {{invalid operands to binary expression}} |
32 | |
33 | return 0; |
34 | } |
35 | |