diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-03-09 09:33:43 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-03-09 09:33:43 +0100 |
commit | d820ab9edc0b38af4cdb3d545714a0c9083e5a78 (patch) | |
tree | 39de2fac91db74c03a6f11807332416d659211e3 /Eigen/src/Core/SelfAdjointView.h | |
parent | adb134d47e70906ed15d877d7a0fe03f3f665c02 (diff) |
Add static assertion on selfadjoint-view's UpLo parameter.
Diffstat (limited to 'Eigen/src/Core/SelfAdjointView.h')
-rw-r--r-- | Eigen/src/Core/SelfAdjointView.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 7e71fe3c0..be219726b 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -71,7 +71,9 @@ template<typename _MatrixType, unsigned int UpLo> class SelfAdjointView EIGEN_DEVICE_FUNC explicit inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix) - {} + { + EIGEN_STATIC_ASSERT(UpLo==Lower || UpLo==Upper,SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY); + } EIGEN_DEVICE_FUNC inline Index rows() const { return m_matrix.rows(); } |