29 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++03, c++11, c++1410 11// <filesystem>12 13#include <filesystem>14namespace fs = std::filesystem;15using namespace fs;16 17struct ConvToPath {18 operator fs::path() const {19 return "";20 }21};22 23int main(int, char**) {24 ConvToPath LHS, RHS;25 (void)(LHS / RHS); // expected-error {{invalid operands to binary expression}}26 27 return 0;28}29