From 042f07eed8c1acba19ea04310137bee12b18045a Mon Sep 17 00:00:00 2001 From: Marshall Clow Date: Tue, 6 Mar 2018 15:01:19 +0000 Subject: [PATCH] Implement P0767R1 - Deprecate POD llvm-svn: 326801 --- .../language.support/support.types/byte.pass.cpp | 6 +- .../support.types/max_align_t.pass.cpp | 7 ++ .../meta.trans.other/aligned_storage.pass.cpp | 102 +++++++++++++++++++++ libcxx/www/cxx2a_status.html | 4 +- 4 files changed, 116 insertions(+), 3 deletions(-) diff --git a/libcxx/test/std/language.support/support.types/byte.pass.cpp b/libcxx/test/std/language.support/support.types/byte.pass.cpp index 66b2a55..a1abefa 100644 --- a/libcxx/test/std/language.support/support.types/byte.pass.cpp +++ b/libcxx/test/std/language.support/support.types/byte.pass.cpp @@ -9,14 +9,18 @@ #include #include -#include +#include "test_macros.h" // XFAIL: c++98, c++03, c++11, c++14 // std::byte is not an integer type, nor a character type. // It is a distinct type for accessing the bits that ultimately make up object storage. +#if TEST_STD_VER > 17 +static_assert( std::is_trivial::value, "" ); // P0767 +#else static_assert( std::is_pod::value, "" ); +#endif static_assert(!std::is_arithmetic::value, "" ); static_assert(!std::is_integral::value, "" ); diff --git a/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp b/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp index 08a6c28..603b6f1 100644 --- a/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp +++ b/libcxx/test/std/language.support/support.types/max_align_t.pass.cpp @@ -14,11 +14,18 @@ // great as that of every scalar type #include +#include "test_macros.h" int main() { +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, + "std::is_trivial::value"); +#else static_assert(std::is_pod::value, "std::is_pod::value"); +#endif static_assert((std::alignment_of::value >= std::alignment_of::value), "std::alignment_of::value >= " diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp index 079661d..216cb7b 100644 --- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp +++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp @@ -22,6 +22,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 1, ""); static_assert(sizeof(T1) == 10, ""); } @@ -30,6 +36,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 2, ""); static_assert(sizeof(T1) == 10, ""); } @@ -38,6 +50,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 4, ""); static_assert(sizeof(T1) == 12, ""); } @@ -46,6 +64,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 8, ""); static_assert(sizeof(T1) == 16, ""); } @@ -54,6 +78,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 16, ""); static_assert(sizeof(T1) == 16, ""); } @@ -62,6 +92,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 32, ""); static_assert(sizeof(T1) == 32, ""); } @@ -70,6 +106,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 32, ""); static_assert(sizeof(T1) == 32, ""); } @@ -78,6 +120,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 32, ""); static_assert(sizeof(T1) == 64, ""); } @@ -86,6 +134,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 16, ""); static_assert(sizeof(T1) == 16, ""); } @@ -94,6 +148,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 1, ""); static_assert(sizeof(T1) == 1, ""); } @@ -102,6 +162,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 2, ""); static_assert(sizeof(T1) == 2, ""); } @@ -110,6 +176,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 2, ""); static_assert(sizeof(T1) == 4, ""); } @@ -118,6 +190,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 4, ""); static_assert(sizeof(T1) == 4, ""); } @@ -126,6 +204,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 4, ""); static_assert(sizeof(T1) == 8, ""); } @@ -142,6 +226,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 8, ""); static_assert(sizeof(T1) == 8, ""); } @@ -150,6 +240,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 8, ""); static_assert(sizeof(T1) == 16, ""); } @@ -158,6 +254,12 @@ int main() #if TEST_STD_VER > 11 static_assert(std::is_same, T1>::value, "" ); #endif +#if TEST_STD_VER > 17 +// P0767 + static_assert(std::is_trivial::value, "" ); +#else + static_assert(std::is_pod::value, "" ); +#endif static_assert(std::alignment_of::value == 8, ""); static_assert(sizeof(T1) == 16, ""); } diff --git a/libcxx/www/cxx2a_status.html b/libcxx/www/cxx2a_status.html index efe5910..7bdef15 100644 --- a/libcxx/www/cxx2a_status.html +++ b/libcxx/www/cxx2a_status.html @@ -69,7 +69,7 @@ P0616R0LWGde-pessimize legacy algorithms with std::moveAlbuquerque P0653R2LWGUtility to convert a pointer to a raw pointerAlbuquerqueComplete6.0 P0718R2LWGAtomic shared_ptrAlbuquerque - P0767R1CWGDeprecate PODAlbuquerque + P0767R1CWGDeprecate PODAlbuquerqueComplete7.0 P0768R1CWGLibrary Support for the Spaceship (Comparison) OperatorAlbuquerque P0777R1LWGTreating Unnecessary decayAlbuquerqueComplete7.0 @@ -135,7 +135,7 @@ -

Last Updated: 6-Feb-2018

+

Last Updated: 6-Mar-2018

-- 2.7.4