[libcxx] r326801 - Implement P0767R1 - Deprecate POD
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 6 07:01:19 PST 2018
Author: marshall
Date: Tue Mar 6 07:01:19 2018
New Revision: 326801
URL: http://llvm.org/viewvc/llvm-project?rev=326801&view=rev
Log:
Implement P0767R1 - Deprecate POD
Modified:
libcxx/trunk/test/std/language.support/support.types/byte.pass.cpp
libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp
libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
libcxx/trunk/www/cxx2a_status.html
Modified: libcxx/trunk/test/std/language.support/support.types/byte.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.types/byte.pass.cpp?rev=326801&r1=326800&r2=326801&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.types/byte.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.types/byte.pass.cpp Tue Mar 6 07:01:19 2018
@@ -9,14 +9,18 @@
#include <cstddef>
#include <type_traits>
-#include <test_macros.h>
+#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<std::byte>::value, "" ); // P0767
+#else
static_assert( std::is_pod<std::byte>::value, "" );
+#endif
static_assert(!std::is_arithmetic<std::byte>::value, "" );
static_assert(!std::is_integral<std::byte>::value, "" );
Modified: libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp?rev=326801&r1=326800&r2=326801&view=diff
==============================================================================
--- libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp (original)
+++ libcxx/trunk/test/std/language.support/support.types/max_align_t.pass.cpp Tue Mar 6 07:01:19 2018
@@ -14,11 +14,18 @@
// great as that of every scalar type
#include <stdio.h>
+#include "test_macros.h"
int main()
{
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<std::max_align_t>::value,
+ "std::is_trivial<std::max_align_t>::value");
+#else
static_assert(std::is_pod<std::max_align_t>::value,
"std::is_pod<std::max_align_t>::value");
+#endif
static_assert((std::alignment_of<std::max_align_t>::value >=
std::alignment_of<long long>::value),
"std::alignment_of<std::max_align_t>::value >= "
Modified: libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp?rev=326801&r1=326800&r2=326801&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/meta/meta.trans/meta.trans.other/aligned_storage.pass.cpp Tue Mar 6 07:01:19 2018
@@ -22,6 +22,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 1>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 1, "");
static_assert(sizeof(T1) == 10, "");
}
@@ -30,6 +36,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 2>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 2, "");
static_assert(sizeof(T1) == 10, "");
}
@@ -38,6 +50,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 4>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 4, "");
static_assert(sizeof(T1) == 12, "");
}
@@ -46,6 +64,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 8>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 8, "");
static_assert(sizeof(T1) == 16, "");
}
@@ -54,6 +78,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 16>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 16, "");
static_assert(sizeof(T1) == 16, "");
}
@@ -62,6 +92,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<10, 32>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 32, "");
static_assert(sizeof(T1) == 32, "");
}
@@ -70,6 +106,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<20, 32>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 32, "");
static_assert(sizeof(T1) == 32, "");
}
@@ -78,6 +120,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<40, 32>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 32, "");
static_assert(sizeof(T1) == 64, "");
}
@@ -86,6 +134,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<12, 16>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 16, "");
static_assert(sizeof(T1) == 16, "");
}
@@ -94,6 +148,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<1>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 1, "");
static_assert(sizeof(T1) == 1, "");
}
@@ -102,6 +162,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<2>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 2, "");
static_assert(sizeof(T1) == 2, "");
}
@@ -110,6 +176,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<3>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 2, "");
static_assert(sizeof(T1) == 4, "");
}
@@ -118,6 +190,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<4>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 4, "");
static_assert(sizeof(T1) == 4, "");
}
@@ -126,6 +204,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<5>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 4, "");
static_assert(sizeof(T1) == 8, "");
}
@@ -142,6 +226,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<8>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 8, "");
static_assert(sizeof(T1) == 8, "");
}
@@ -150,6 +240,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<9>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 8, "");
static_assert(sizeof(T1) == 16, "");
}
@@ -158,6 +254,12 @@ int main()
#if TEST_STD_VER > 11
static_assert(std::is_same<std::aligned_storage_t<15>, T1>::value, "" );
#endif
+#if TEST_STD_VER > 17
+// P0767
+ static_assert(std::is_trivial<T1>::value, "" );
+#else
+ static_assert(std::is_pod<T1>::value, "" );
+#endif
static_assert(std::alignment_of<T1>::value == 8, "");
static_assert(sizeof(T1) == 16, "");
}
Modified: libcxx/trunk/www/cxx2a_status.html
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/www/cxx2a_status.html?rev=326801&r1=326800&r2=326801&view=diff
==============================================================================
--- libcxx/trunk/www/cxx2a_status.html (original)
+++ libcxx/trunk/www/cxx2a_status.html Tue Mar 6 07:01:19 2018
@@ -69,7 +69,7 @@
<tr><td><a href="https://wg21.link/P0616R0">P0616R0</a></td><td>LWG</td><td>de-pessimize legacy <numeric> algorithms with std::move</td><td>Albuquerque</td><td></td><td></td></tr>
<tr><td><a href="https://wg21.link/P0653R2">P0653R2</a></td><td>LWG</td><td>Utility to convert a pointer to a raw pointer</td><td>Albuquerque</td><td>Complete</td><td>6.0</td></tr>
<tr><td><a href="https://wg21.link/P0718R2">P0718R2</a></td><td>LWG</td><td>Atomic shared_ptr</td><td>Albuquerque</td><td></td><td></td></tr>
- <tr><td><a href="https://wg21.link/P0767R1">P0767R1</a></td><td>CWG</td><td>Deprecate POD</td><td>Albuquerque</td><td></td><td></td></tr>
+ <tr><td><a href="https://wg21.link/P0767R1">P0767R1</a></td><td>CWG</td><td>Deprecate POD</td><td>Albuquerque</td><td>Complete</td><td>7.0</td></tr>
<tr><td><a href="https://wg21.link/P0768R1">P0768R1</a></td><td>CWG</td><td>Library Support for the Spaceship (Comparison) Operator</td><td>Albuquerque</td><td></td><td></td></tr>
<tr><td><a href="https://wg21.link/P0777R1">P0777R1</a></td><td>LWG</td><td>Treating Unnecessary <tt>decay</tt></td><td>Albuquerque</td><td>Complete</td><td>7.0</td></tr>
@@ -135,7 +135,7 @@
<!-- <tr><td></td><td></td><td></td><td></td></tr> -->
</table>
- <p>Last Updated: 6-Feb-2018</p>
+ <p>Last Updated: 6-Mar-2018</p>
</div>
</body>
</html>
More information about the cfe-commits
mailing list