• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 
3 int &operator "" _x1 (long double);
4 int &i1 = 0.123_x1;
5 
6 double &operator "" _x1 (const char *);
7 int &i2 = 45._x1;
8 
9 template<char...> char &operator "" _x1 ();
10 int &i3 = 0377e-1_x1;
11 
12 int &i4 = 1e1000000_x1; // expected-warning {{too large for type 'long double'}}
13 
14 double &operator "" _x2 (const char *);
15 double &i5 = 1e1000000_x2;
16 
operator ""_x3()17 template<char...Cs> constexpr int operator "" _x3() { return sizeof...(Cs); }
18 static_assert(1e1000000_x3 == 9, "");
19