gcc/ChangeLog:
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1z / inline-var1.h
blob675e71b0763d3eca76ad80972088864e9e7fd164
1 inline int var1 = 4;
2 static inline int var7 = 9;
3 namespace N
5 int inline var2;
6 inline const int var6 = 8;
7 static inline double var8 = 2.0;
8 extern inline char var10;
10 struct S
12 static constexpr int var3 = 5;
13 static inline int var4 = 6;
14 static constexpr int var5 = 7;
15 static inline double var9 = 3.0;
16 static constexpr inline int var11 = 11;
18 const int S::var3;
19 const int S::var3;
20 extern int foo (int);
21 extern int bar (int);
22 struct T { T () { t = foo (3); } T (int x) { t = foo (x); } int t; };
23 inline int var12 = foo (0);
24 int inline var13 = foo (1);
25 struct U
27 static inline int var14 = foo (2);
28 static inline T var15;
29 static inline T var16 = 4;
30 static int inline var17 = foo (5);
31 static constexpr double var18 = 4.0;
33 template <typename T>
34 struct Y
36 static constexpr T var24 = 6;
37 static inline T var25 = 7;
38 static inline int var26 = 8;
39 static constexpr T var28 = 10;
41 template <typename T>
42 const T Y<T>::var24;
43 template <typename T>
44 const T Y<T>::var24;
45 template <typename T>
46 inline T var27 = 9;