diff options
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r-- | test/indexed_view.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 0be5e434c..5d8ce16ee 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -11,6 +11,10 @@ #include <vector> #include "main.h" +#if EIGEN_HAS_CXX11 +#include <array> +#endif + typedef std::pair<Index,Index> IndexPair; int encode(Index i, Index j) { @@ -108,6 +112,13 @@ void check_indexed_view() VERIFY( (B(all,1)).ColsAtCompileTime == 1); VERIFY( (B(all,1)).RowsAtCompileTime == 4); + VERIFY( (A(all, eii)).ColsAtCompileTime == eii.SizeAtCompileTime); +#if EIGEN_HAS_CXX11 + VERIFY( (A(all, std::array<int,4>{{1,3,2,4}})).ColsAtCompileTime == 4); + + VERIFY_IS_APPROX( (A(std::array<int,3>{{1,3,5}}, std::array<int,4>{{9,6,3,0}})), A(span(1,3,2), span(9,4,-3)) ); +#endif + } void test_indexed_view() |