xref: /llvm-project/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.verify.cpp (revision ac8c9f1e39e1a773fd81ce23dbf1c80ea186f226)
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 {
operator fs::pathConvToPath19   operator fs::path() const {
20     return "";
21   }
22 };
23 
main(int,char **)24 int main(int, char**) {
25   ConvToPath LHS, RHS;
26   (void)(LHS / RHS); // expected-error {{invalid operands to binary expression}}
27 
28   return 0;
29 }
30