From aaf182638498009cb9c0c7189880396db4e48ba5 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 3 Sep 2009 01:28:12 -0400 Subject: [PATCH] backport: the first fix was the good one --- Eigen/src/Core/Matrix.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index af21553a7..ffd16d376 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -539,12 +539,13 @@ class Matrix INVALID_MATRIX_TEMPLATE_PARAMETERS) } - template + template friend struct ei_matrix_swap_impl; }; template::ret> + bool IsSameType = ei_is_same_type::ret, + bool IsDynamicSize = MatrixType::SizeAtCompileTime==Dynamic> struct ei_matrix_swap_impl { static inline void run(MatrixType& matrix, MatrixBase& other) @@ -554,11 +555,10 @@ struct ei_matrix_swap_impl }; template -struct ei_matrix_swap_impl +struct ei_matrix_swap_impl { static inline void run(MatrixType& matrix, MatrixBase& other) { - ei_assert(matrix.rows() == other.rows() && matrix.cols() == other.cols()); matrix.m_storage.swap(other.derived().m_storage); } };