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); } };