aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SVD/SVDBase.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-03-13 21:06:20 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-03-13 21:06:20 +0100
commit8580eb6808428a53d5fb91be23fb5c6c8c9e9463 (patch)
tree4e54a55f359ba5f73d1ab0fc51838a4aae96564c /Eigen/src/SVD/SVDBase.h
parenta9df28c95b42401fe4ac86313b85872200d05e4c (diff)
bug #949: add static assertion for incompatible scalar types in dense end-user decompositions.
Diffstat (limited to 'Eigen/src/SVD/SVDBase.h')
-rw-r--r--Eigen/src/SVD/SVDBase.h10
1 files changed, 9 insertions, 1 deletions
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();
+ }
};