1 // RUN: %clang_cc1 -std=c++1y %s -include %s -verify
6 #pragma clang system_header
8 using size_t = decltype(sizeof(0));
11 duration
operator""ns(unsigned long long);
12 duration
operator""us(unsigned long long);
13 duration
operator""ms(unsigned long long);
14 duration
operator""s(unsigned long long);
15 duration
operator""min(unsigned long long);
16 duration
operator""h(unsigned long long);
19 string
operator""s(const char*, size_t);
21 template<typename T
> struct complex {};
22 complex<float> operator""if(long double);
23 complex<float> operator""if(unsigned long long);
24 complex<double> operator""i(long double);
25 complex<double> operator""i(unsigned long long);
26 complex<long double> operator""il(long double);
27 complex<long double> operator""il(unsigned long long);
33 duration a
= 1ns
, b
= 1us
, c
= 1ms
, d
= 1s
, e
= 1min
, f
= 1h
;
35 char error
= 'x's
; // expected-error {{invalid suffix}} expected-error {{expected ';'}}
37 int _1y
= 1y
; // expected-error {{invalid suffix}}
38 int _1b
= 1b
; // expected-error {{invalid digit}}
40 complex<float> cf1
= 1if, cf2
= 2.if, cf3
= 0x3if
;
41 complex<double> cd1
= 1i
, cd2
= 2.i
, cd3
= 0b0110101i
;
42 complex<long double> cld1
= 1il
, cld2
= 2.il
, cld3
= 0047il
;