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>
15namespace fs = std::filesystem;
16using namespace fs;
17
18struct ConvToPath {
19 operator fs::path() const {
20 return "";
21 }
22};
23
24int main(int, char**) {
25 ConvToPath LHS, RHS;
26 (void)(LHS / RHS); // expected-error {{invalid operands to binary expression}}
27
28 return 0;
29}
30

source code of libcxx/test/std/input.output/filesystems/class.path/path.nonmember/append_op.verify.cpp