//===----------------------------------------------------------------------===// // // 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 // is_standard_layout #include template void test_is_standard_layout() { static_assert( std::is_standard_layout::value, ""); static_assert( std::is_standard_layout::value, ""); static_assert( std::is_standard_layout::value, ""); static_assert( std::is_standard_layout::value, ""); } template void test_is_not_standard_layout() { static_assert(!std::is_standard_layout::value, ""); static_assert(!std::is_standard_layout::value, ""); static_assert(!std::is_standard_layout::value, ""); static_assert(!std::is_standard_layout::value, ""); } template struct pair { T1 first; T2 second; }; int main() { test_is_standard_layout (); test_is_standard_layout (); test_is_standard_layout > (); test_is_not_standard_layout (); }