Make non-conversion unary constructors explicit.

This commit is contained in:
Chen-Pang He
2013-07-11 02:31:13 +08:00
parent 4466875d54
commit a992fa74eb
3 changed files with 9 additions and 9 deletions

View File

@@ -36,7 +36,7 @@ class MatrixSquareRootQuasiTriangular : internal::noncopyable
* The class stores a reference to \p A, so it should not be
* changed (or destroyed) before compute() is called.
*/
MatrixSquareRootQuasiTriangular(const MatrixType& A)
explicit MatrixSquareRootQuasiTriangular(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -256,7 +256,7 @@ template <typename MatrixType>
class MatrixSquareRootTriangular : internal::noncopyable
{
public:
MatrixSquareRootTriangular(const MatrixType& A)
explicit MatrixSquareRootTriangular(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -321,7 +321,7 @@ class MatrixSquareRoot
* The class stores a reference to \p A, so it should not be
* changed (or destroyed) before compute() is called.
*/
MatrixSquareRoot(const MatrixType& A);
explicit MatrixSquareRoot(const MatrixType& A);
/** \brief Compute the matrix square root
*
@@ -341,7 +341,7 @@ class MatrixSquareRoot<MatrixType, 0>
{
public:
MatrixSquareRoot(const MatrixType& A)
explicit MatrixSquareRoot(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -374,7 +374,7 @@ class MatrixSquareRoot<MatrixType, 1> : internal::noncopyable
{
public:
MatrixSquareRoot(const MatrixType& A)
explicit MatrixSquareRoot(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -422,7 +422,7 @@ template<typename Derived> class MatrixSquareRootReturnValue
* \param[in] src %Matrix (expression) forming the argument of the
* matrix square root.
*/
MatrixSquareRootReturnValue(const Derived& src) : m_src(src) { }
explicit MatrixSquareRootReturnValue(const Derived& src) : m_src(src) { }
/** \brief Compute the matrix square root.
*