Make non-conversion unary constructors explicit.
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
index 221ec31..750b0b9 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h
@@ -32,7 +32,7 @@
*
* \param[in] M matrix whose exponential is to be computed.
*/
- MatrixExponential(const MatrixType &M);
+ explicit MatrixExponential(const MatrixType &M);
/** \brief Computes the matrix exponential.
*
@@ -415,7 +415,7 @@
* \param[in] src %Matrix (expression) forming the argument of the
* matrix exponential.
*/
- MatrixExponentialReturnValue(const Derived& src) : m_src(src) { }
+ explicit MatrixExponentialReturnValue(const Derived& src) : m_src(src) { }
/** \brief Compute the matrix exponential.
*
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h b/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h
index 32ec385..33cfadf 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixLogarithm.h
@@ -425,7 +425,7 @@
*
* \param[in] A %Matrix (expression) forming the argument of the matrix logarithm.
*/
- MatrixLogarithmReturnValue(const Derived& A) : m_A(A) { }
+ explicit MatrixLogarithmReturnValue(const Derived& A) : m_A(A) { }
/** \brief Compute the matrix logarithm.
*
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h b/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h
index c405bfd..0cd39eb 100644
--- a/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h
+++ b/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h
@@ -36,7 +36,7 @@
* 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 @@
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 @@
* 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 @@
{
public:
- MatrixSquareRoot(const MatrixType& A)
+ explicit MatrixSquareRoot(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -374,7 +374,7 @@
{
public:
- MatrixSquareRoot(const MatrixType& A)
+ explicit MatrixSquareRoot(const MatrixType& A)
: m_A(A)
{
eigen_assert(A.rows() == A.cols());
@@ -422,7 +422,7 @@
* \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.
*