p3.cpp revision 36f5cfe4df32af6c5fe01228102512996f566f9d
1// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2
3int &operator "" _x1 (unsigned long long);
4int &i1 = 0x123_x1;
5
6double &operator "" _x1 (const char *);
7int &i2 = 45_x1;
8
9template<char...> char &operator "" _x1 ();
10int &i3 = 0377_x1;
11
12int &i4 = 90000000000000000000000000000000000000000000000_x1; // expected-warning {{integer constant is too large}}
13
14double &operator "" _x2 (const char *);
15double &i5 = 123123123123123123123123123123123123123123123_x2;
16
17template<char...Cs> constexpr int operator "" _x3() { return sizeof...(Cs); }
18static_assert(123456789012345678901234567890123456789012345678901234567890_x3 == 60, "");
19