Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/alignas1.C

raw
1 // PR c++/65734
2 // { dg-do compile { target c++11 } }
3 // { dg-options "" }
4
5 template <class T> struct A
6 {
7 T t;
8 };
9
10 typedef A<int> T[4] alignas (2 * alignof (int));
11 A<int> a[4];
12
13 typedef A<char> T2[4] alignas (2 * alignof (int));
14
15 #define SA(X) static_assert((X),#X)
16 SA(alignof (T) == 2 * alignof(int));
17 SA(alignof (T2) == 2 * alignof(int));