p5.cpp revision b328e29173d15baf3f44ccdc9c310ee741caaaf7
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 for call to 'operator "" _x1' with arguments of types 'const wchar_t *' and 'unsigned long'}} 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