Debian Codegraph @

gcc/testsuite/g++.dg/ext/alias-decl-attr1.C

raw
1 // { dg-do compile { target c++11 } }
2
3 template <unsigned Len, unsigned Align>
4 struct aligned_storage
5 {
6 using type __attribute__((aligned((Align)))) =
7 char[Len];
8 };
9
10 template<typename T>
11 struct X
12 {
13 typename aligned_storage<sizeof(T),__alignof(T)>::type data;
14 };
15
16 template<bool> struct StaticAssert;
17 template<> struct StaticAssert<true> {};
18
19 StaticAssert<__alignof (X<double>) == __alignof (double)> dummy;