You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
467 B
22 lines
467 B
// RUN: %clang_cc1 -std=c++1z %s -include %s -verify
|
|
|
|
#ifndef INCLUDED
|
|
#define INCLUDED
|
|
|
|
#pragma clang system_header
|
|
namespace std {
|
|
using size_t = decltype(sizeof(0));
|
|
|
|
struct string_view {};
|
|
string_view operator""sv(const char*, size_t);
|
|
}
|
|
|
|
#else
|
|
|
|
using namespace std;
|
|
string_view s = "foo"sv;
|
|
const char* p = "bar"sv; // expected-error {{no viable conversion}}
|
|
char error = 'x'sv; // expected-error {{invalid suffix}} expected-error {{expected ';'}}
|
|
|
|
#endif
|