Add static assertion for fixed sizes Ref<>

This commit is contained in:
Gael Guennebaud
2018-03-09 10:11:13 +01:00
parent f6be7289d7
commit f7d17689a5
2 changed files with 15 additions and 1 deletions

View File

@@ -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);