mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make constructors explicit if they could lead to unintended implicit conversion
This commit is contained in:
@@ -192,7 +192,7 @@ struct evaluator<MappedSparseMatrix<_Scalar,_Options,_Index> >
|
||||
};
|
||||
|
||||
evaluator() : m_matrix(0) {}
|
||||
evaluator(const MappedSparseMatrixType &mat) : m_matrix(&mat) {}
|
||||
explicit evaluator(const MappedSparseMatrixType &mat) : m_matrix(&mat) {}
|
||||
|
||||
operator MappedSparseMatrixType&() { return m_matrix->const_cast_derived(); }
|
||||
operator const MappedSparseMatrixType&() const { return *m_matrix; }
|
||||
|
||||
Reference in New Issue
Block a user