[libcxx-commits] [libcxx] [libcxxabi] [libc++] P3247R2: Deprecate `is_trivial(_v)` (PR #130573)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 10 06:49:10 PDT 2025
================
@@ -123,7 +123,9 @@ void test() {
// Make sure both types have the same triviality (that has ABI impact since
// it determined how objects are passed). Both should be non-trivial.
- static_assert(std::is_trivial<New>::value == std::is_trivial<Old>::value, "");
+ static_assert((std::is_trivially_copyable<New>::value && std::is_trivially_default_constructible<New>::value) ==
+ (std::is_trivially_copyable<Old>::value && std::is_trivially_default_constructible<Old>::value),
+ "");
----------------
philnik777 wrote:
We can probably enforce that `is_trivially_copyable<New> == is_trivially_copable<Old> && ...`.
https://github.com/llvm/llvm-project/pull/130573
More information about the libcxx-commits
mailing list