Guard usage of decltype since it's a C++11 feature

This fixes https://gitlab.com/libeigen/eigen/-/issues/1897
This commit is contained in:
David Tellenbach 2020-05-20 16:01:41 +02:00
parent cc86a31e20
commit 5328cd62b3

View File

@ -439,11 +439,13 @@ void check_indexed_view()
VERIFY( MATCH( A(all,1)(1), "101"));
}
#if EIGEN_HAS_CXX11
//Bug IndexView with a single static row should be RowMajor:
{
// A(1, seq(0,2,1)).cwiseAbs().colwise().replicate(2).eval();
STATIC_CHECK(( (internal::evaluator<decltype( A(1,seq(0,2,1)) )>::Flags & RowMajorBit) == RowMajorBit ));
}
#endif
}