From: Wolfgang Bangerth Date: Wed, 18 Dec 2024 03:43:05 +0000 (-0700) Subject: Avoid the final incorrect use of std::is_trivial. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53b9aaa6140b2c9f9f117c2a8e1181124ec18d43;p=dealii.git Avoid the final incorrect use of std::is_trivial. --- 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;