aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/lex/lex.literal/lex.ext/p5.cpp
blob: 06c091d8acae19e5ba67b6440a5aaef73fdf03ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s

using size_t = decltype(sizeof(int));

int &operator "" _x1 (const char *);
double &operator "" _x1 (const char *, size_t);
double &i1 = "foo"_x1;
double &i2 = u8"foo"_x1;
double &i3 = L"foo"_x1; // expected-error {{no matching literal operator}}

char &operator "" _x1(const wchar_t *, size_t);
char &i4 = L"foo"_x1; // ok
double &i5 = R"(foo)"_x1; // ok
double &i6 = u\
8\
R\
"(foo)"\
_\
x\
1; // ok