From 53b9aaa6140b2c9f9f117c2a8e1181124ec18d43 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Dec 2024 20:43:05 -0700 Subject: [PATCH] Avoid the final incorrect use of std::is_trivial. --- include/deal.II/lac/vector_operations_internal.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/deal.II/lac/vector_operations_internal.h b/include/deal.II/lac/vector_operations_internal.h index cdbeacc223..a59e9d9354 100644 --- a/include/deal.II/lac/vector_operations_internal.h +++ b/include/deal.II/lac/vector_operations_internal.h @@ -210,14 +210,9 @@ namespace internal Assert(end >= begin, ExcInternalError()); if (value == Number()) - { - if constexpr (std::is_trivial_v) - { - std::memset(dst + begin, 0, sizeof(Number) * (end - begin)); - return; - } - } - std::fill(dst + begin, dst + end, value); + std::fill(dst + begin, dst + end, Number()); + else + std::fill(dst + begin, dst + end, value); } const Number value; -- 2.39.5