1 // typedef
2 typedef unsigned long ULongArrayTypedef[10];
3 ULongArrayTypedef ULongArrayVar;
4 
5 typedef long double*& RefTypedef;
6 long double* LongDoublePtrVar = 0;
7 RefTypedef RefVar = LongDoublePtrVar;
8 
9 typedef long long (*FuncPtrTypedef)(int&, unsigned char**, short[], const double, volatile bool);
10 FuncPtrTypedef FuncVar;
11 
12 typedef char (*VarArgsFuncTypedef)(void*, long, unsigned short, unsigned int, ...);
13 VarArgsFuncTypedef VarArgsFuncVar;
14 
15 typedef float (*VarArgsFuncTypedefA)(...);
16 VarArgsFuncTypedefA VarArgsFuncVarA;
17 
18 // unscoped enum
19 enum Enum { RED, GREEN, BLUE };
20 Enum EnumVar;
21 
22 enum EnumConst { LOW, NORMAL = 10, HIGH };
23 EnumConst EnumConstVar;
24 
25 enum EnumEmpty {};
26 EnumEmpty EnumEmptyVar;
27 
28 enum EnumUChar : unsigned char { ON, OFF, AUTO };
29 EnumUChar EnumCharVar;
30 
31 // scoped enum
32 enum class EnumClass { YES, NO, DEFAULT };
33 EnumClass EnumClassVar;
34 
35 enum struct EnumStruct { red, blue, black };
36 EnumStruct EnumStructVar;
37 
38 typedef signed char SCharTypedef;
39 SCharTypedef SCVar;
40 
41 typedef char16_t WChar16Typedef;
42 WChar16Typedef WC16Var;
43 
44 typedef char32_t WChar32Typedef;
45 WChar32Typedef WC32Var;
46 
47 typedef wchar_t WCharTypedef;
48 WCharTypedef WCVar;
49 
main()50 int main() {
51   return 0;
52 }
53