From 1141d6791aaeb00e2c7c4c1658c619ba61e79fde Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Dec 2024 20:38:59 -0700 Subject: [PATCH] Avoid another incorrect use of std::is_trivial. --- source/base/vectorization.cc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/source/base/vectorization.cc b/source/base/vectorization.cc index 24982dad50..9526306fc0 100644 --- a/source/base/vectorization.cc +++ b/source/base/vectorization.cc @@ -22,11 +22,18 @@ DEAL_II_NAMESPACE_OPEN // and it is trivial (can be statically default initialized) // Here, the trait std::is_pod cannot be used because it is deprecated // in C++20. -static_assert(std::is_standard_layout_v> && - std::is_trivial_v>, - "VectorizedArray must be a POD type"); -static_assert(std::is_standard_layout_v> && - std::is_trivial_v>, - "VectorizedArray must be a POD type"); +// +// Check these statements to ensure we catch problems if we accidentally +// make these classes non-POD. +static_assert( + std::is_standard_layout_v> && + std::is_trivially_default_constructible_v> && + std::is_trivially_copyable_v>, + "VectorizedArray must be a POD type"); +static_assert( + std::is_standard_layout_v> && + std::is_trivially_default_constructible_v> && + std::is_trivially_copyable_v>, + "VectorizedArray must be a POD type"); DEAL_II_NAMESPACE_CLOSE -- 2.39.5