Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/gen-attrs-54.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/56859 |
2 // { dg-require-effective-target c++11 } | |
3 | |
4 template<unsigned size, unsigned alignment> | |
5 struct aligned_storage | |
6 { | |
7 using type = struct { alignas(alignment) unsigned char data[size]; }; | |
8 }; | |
9 | |
10 #define SA(X) static_assert((X),#X) | |
11 SA(alignof(aligned_storage<8,1>::type) == 1); | |
12 SA(alignof(aligned_storage<8,2>::type) == 2); | |
13 SA(alignof(aligned_storage<8,4>::type) == 4); | |
14 SA(alignof(aligned_storage<8,8>::type) == 8); |