From 8580eb6808428a53d5fb91be23fb5c6c8c9e9463 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 13 Mar 2015 21:06:20 +0100 Subject: bug #949: add static assertion for incompatible scalar types in dense end-user decompositions. --- Eigen/src/SVD/SVDBase.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Eigen/src/SVD') diff --git a/Eigen/src/SVD/SVDBase.h b/Eigen/src/SVD/SVDBase.h index 8903755e7..b89393721 100644 --- a/Eigen/src/SVD/SVDBase.h +++ b/Eigen/src/SVD/SVDBase.h @@ -217,6 +217,12 @@ public: #endif protected: + + static void check_template_parameters() + { + EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar); + } + // return true if already allocated bool allocate(Index rows, Index cols, unsigned int computationOptions) ; @@ -240,7 +246,9 @@ protected: m_usePrescribedThreshold(false), m_computationOptions(0), m_rows(-1), m_cols(-1), m_diagSize(0) - {} + { + check_template_parameters(); + } }; -- cgit v1.2.3