append_op.fail.cpp 688 B

12345678910111213141516171819202122232425262728
  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. // UNSUPPORTED: c++98, c++03
  9. // <filesystem>
  10. #include "filesystem_include.hpp"
  11. using namespace fs;
  12. struct ConvToPath {
  13. operator fs::path() const {
  14. return "";
  15. }
  16. };
  17. int main(int, char**) {
  18. ConvToPath LHS, RHS;
  19. (void)(LHS / RHS); // expected-error {{invalid operands to binary expression}}
  20. return 0;
  21. }