15 lines · cpp
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s2 3using size_t = decltype(sizeof(int));4 5int &operator ""_x1 (const char *);6double &i1 = 'a'_x1; // expected-error {{no matching literal operator}}7double &operator ""_x1 (wchar_t);8double &i2 = L'a'_x1;9double &i3 = 'a'_x1; // expected-error {{no matching literal operator}}10double &i4 = operator""_x1('a'); // ok11 12char &operator ""_x1(char16_t);13char &i5 = u'a'_x1; // ok14double &i6 = L'a'_x1; // ok15