From e246f9cb68d07e8f15c60a2404ac9a625c349223 Mon Sep 17 00:00:00 2001 From: Charles Schlosser Date: Thu, 22 Jan 2026 01:01:26 +0000 Subject: [PATCH] Use memset if !NumTraits::RequireInitialization libeigen/eigen!2113 Closes #3019 --- Eigen/src/Core/Fill.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/Fill.h b/Eigen/src/Core/Fill.h index 779ef26ab..6f4593589 100644 --- a/Eigen/src/Core/Fill.h +++ b/Eigen/src/Core/Fill.h @@ -93,8 +93,10 @@ struct eigen_fill_impl { template struct eigen_memset_helper { - static constexpr bool value = - std::is_trivially_copyable::value && eigen_fill_helper::value; + using Scalar = typename Xpr::Scalar; + static constexpr bool value = std::is_trivially_copyable::value && + !static_cast(NumTraits::RequireInitialization) && + eigen_fill_helper::value; }; template