literal2.fail.cpp 740 B

12345678910111213141516171819202122
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. // UNSUPPORTED: c++98, c++03, c++11
  10. // UNSUPPORTED: clang-3.3, clang-3.4, clang-3.5, clang-3.6, clang-3.7, clang-3.8, clang-3.9
  11. // UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8
  12. #include <string_view>
  13. #include <cassert>
  14. int main(int, char**)
  15. {
  16. std::string_view foo = ""sv; // should fail w/conversion operator not found
  17. return 0;
  18. }