p5.cpp revision 30cddaec99fa6c3207613efdaedbb51dd8d70c77
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3using size_t = decltype(sizeof(int));
4
5int &operator "" _x1 (const char *);
6double &operator "" _x1 (const char *, size_t);
7double &i1 = "foo"_x1;
8double &i2 = u8"foo"_x1;
9double &i3 = L"foo"_x1; // expected-error {{no matching literal operator}}
10
11char &operator "" _x1(const wchar_t *, size_t);
12char &i4 = L"foo"_x1; // ok
13double &i5 = R"(foo)"_x1; // ok
14double &i6 = u\
158\
16R\
17"(foo)"\
18_\
19x\
201; // ok
21