Debian Codegraph @

gcc/testsuite/g++.dg/ext/tmplattr2.C

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