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