diff --git a/Eigen/src/SparseCore/SparseAssign.h b/Eigen/src/SparseCore/SparseAssign.h index 1ce60f385..9e8a31a45 100644 --- a/Eigen/src/SparseCore/SparseAssign.h +++ b/Eigen/src/SparseCore/SparseAssign.h @@ -33,8 +33,9 @@ template template inline Derived& SparseMatrixBase::operator=(const SparseMatrixBase& other) { - // FIXME, by default sparse evaluation do not alias, so we should be able to bypass the generic call_assignment - internal::call_assignment/*_no_alias*/(derived(), other.derived()); + // by default sparse evaluation do not alias, so we can safely bypass the generic call_assignment routine + internal::Assignment > + ::run(derived(), other.derived(), internal::assign_op()); return derived(); } @@ -68,8 +69,6 @@ template<> struct AssignmentKind { typedef S template void assign_sparse_to_sparse(DstXprType &dst, const SrcXprType &src) { - eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); - typedef typename DstXprType::Scalar Scalar; typedef typename internal::evaluator::type DstEvaluatorType; typedef typename internal::evaluator::type SrcEvaluatorType; @@ -129,8 +128,6 @@ struct Assignment { static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op &/*func*/) { - eigen_assert(dst.rows() == src.rows() && dst.cols() == src.cols()); - assign_sparse_to_sparse(dst.derived(), src.derived()); } };