//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // type_traits // alignment_of #include #include template void test_alignment_of() { static_assert( std::alignment_of::value == A, ""); static_assert( std::alignment_of::value == A, ""); static_assert( std::alignment_of::value == A, ""); static_assert( std::alignment_of::value == A, ""); } class Class { public: ~Class(); }; int main() { test_alignment_of(); test_alignment_of(); test_alignment_of(); test_alignment_of(); test_alignment_of(); test_alignment_of(); test_alignment_of(); #if (defined(__ppc__) && !defined(__ppc64__)) test_alignment_of(); // 32-bit PPC has four byte bool #else test_alignment_of(); #endif test_alignment_of(); }