2 // { dg-do compile { target c++11 } }
3 // { dg-additional-options "-Wno-pedantic" }
5 // Verify the non-standard extension alignof(expr) behaves like
6 // alignof(type) to yield the ABI alignment of the type, and that
7 // __alignof__(expr) behaves like __alignof__(type) to yield the
8 // preferred alignment of the type.
10 static_assert(alignof(double{}) == alignof(double), "");
11 static_assert(__alignof__(double{}) == __alignof__(double), "");
15 static_assert(alignof(T{}) == alignof(T), "");
16 static_assert(__alignof__(T{}) == __alignof__(T), "");
19 template void f<double>();