diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-03-13 21:06:20 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-03-13 21:06:20 +0100 |
commit | 8580eb6808428a53d5fb91be23fb5c6c8c9e9463 (patch) | |
tree | 4e54a55f359ba5f73d1ab0fc51838a4aae96564c /Eigen/src/QR/FullPivHouseholderQR.h | |
parent | a9df28c95b42401fe4ac86313b85872200d05e4c (diff) |
bug #949: add static assertion for incompatible scalar types in dense end-user decompositions.
Diffstat (limited to 'Eigen/src/QR/FullPivHouseholderQR.h')
-rw-r--r-- | Eigen/src/QR/FullPivHouseholderQR.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Eigen/src/QR/FullPivHouseholderQR.h b/Eigen/src/QR/FullPivHouseholderQR.h index 4952fbb46..4c2c958a8 100644 --- a/Eigen/src/QR/FullPivHouseholderQR.h +++ b/Eigen/src/QR/FullPivHouseholderQR.h @@ -380,6 +380,12 @@ template<typename _MatrixType> class FullPivHouseholderQR #endif protected: + + static void check_template_parameters() + { + EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar); + } + MatrixType m_qr; HCoeffsType m_hCoeffs; IntDiagSizeVectorType m_rows_transpositions; @@ -419,6 +425,8 @@ typename MatrixType::RealScalar FullPivHouseholderQR<MatrixType>::logAbsDetermin template<typename MatrixType> FullPivHouseholderQR<MatrixType>& FullPivHouseholderQR<MatrixType>::compute(const MatrixType& matrix) { + check_template_parameters(); + using std::abs; Index rows = matrix.rows(); Index cols = matrix.cols(); |