brintos

brintos / llvm-project-archived public Read only

0
0
Text · 773 B · a5b1d4d Raw
24 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// Note: libc++ supports string_view before C++17, but literals were introduced in C++1410// UNSUPPORTED: c++03, c++1111// UNSUPPORTED: !stdlib=libc++ && c++1412 13#include <string_view>14 15void f() {16  {17    using std::string_view;18    string_view foo = ""sv; // expected-error {{no matching literal operator}}19  }20  {21    std::string_view foo = ""sv; // expected-error {{no matching literal operator}}22  }23}24