diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-03-09 10:11:13 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-03-09 10:11:13 +0100 |
commit | f7d17689a5e4609418c55ec47d7e5924e2785460 (patch) | |
tree | 81b561d10215c6f25001b19723e5b214d9b6abbb /Eigen/src/Core/Ref.h | |
parent | f6be7289d703ea608db01bfae1fb41cb93465363 (diff) |
Add static assertion for fixed sizes Ref<>
Diffstat (limited to 'Eigen/src/Core/Ref.h')
-rw-r--r-- | Eigen/src/Core/Ref.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Eigen/src/Core/Ref.h b/Eigen/src/Core/Ref.h index abb1e5121..ac9502bc4 100644 --- a/Eigen/src/Core/Ref.h +++ b/Eigen/src/Core/Ref.h @@ -95,6 +95,8 @@ protected: template<typename Expression> EIGEN_DEVICE_FUNC void construct(Expression& expr) { + EIGEN_STATIC_ASSERT_SAME_MATRIX_SIZE(PlainObjectType,Expression); + if(PlainObjectType::RowsAtCompileTime==1) { eigen_assert(expr.rows()==1 || expr.cols()==1); |