From b55dab7f2118e59834bcea85d98d2644c4ce614d Mon Sep 17 00:00:00 2001 From: Charles Schlosser Date: Sat, 12 Oct 2024 21:03:30 +0000 Subject: [PATCH] Fix DenseBase::tail for Dynamic template argument --- Eigen/src/plugins/BlockMethods.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/plugins/BlockMethods.inc b/Eigen/src/plugins/BlockMethods.inc index 122a2f4ab..46dc9ddd1 100644 --- a/Eigen/src/plugins/BlockMethods.inc +++ b/Eigen/src/plugins/BlockMethods.inc @@ -1304,14 +1304,14 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType::T template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename FixedSegmentReturnType::Type tail(Index n = N) { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) - return typename FixedSegmentReturnType::Type(derived(), size() - n); + return typename FixedSegmentReturnType::Type(derived(), size() - n, n); } /// This is the const version of tail. template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstFixedSegmentReturnType::Type tail(Index n = N) const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) - return typename ConstFixedSegmentReturnType::Type(derived(), size() - n); + return typename ConstFixedSegmentReturnType::Type(derived(), size() - n, n); } /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this