diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-02-11 10:28:44 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-02-11 10:28:44 +0100 |
commit | 4a4a72951fc6175e7e5ee3bcdc96a2c8b7160e68 (patch) | |
tree | 4b6459e29b12b95c2451f3c659076e91999c6a0b /test/indexed_view.cpp | |
parent | 1ef30b8090ad56bac5d1b0553a2b0a894a77405e (diff) |
Fix previous commits: disbale only problematic indexed view methods for old compilers instead of disabling everything.
Tested with gcc 4.7 (c++03) and gcc 4.8 (c++03 & c++11)
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r-- | test/indexed_view.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 4cbc00639..7245cf378 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -79,7 +79,6 @@ is_same_seq_type(const T1& a, const T2& b) void check_indexed_view() { -#if EIGEN_HAS_INDEXED_VIEW using Eigen::placeholders::all; using Eigen::placeholders::last; using Eigen::placeholders::end; @@ -298,6 +297,7 @@ void check_indexed_view() VERIFY_IS_APPROX( (A(std::array<int,3>{{1,3,5}}, std::array<int,4>{{9,6,3,0}})), A(seqN(1,3,2), seqN(9,4,-3)) ); +#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE VERIFY_IS_APPROX( A({3, 1, 6, 5}, all), A(std::array<int,4>{{3, 1, 6, 5}}, all) ); VERIFY_IS_APPROX( A(all,{3, 1, 6, 5}), A(all,std::array<int,4>{{3, 1, 6, 5}}) ); VERIFY_IS_APPROX( A({1,3,5},{3, 1, 6, 5}), A(std::array<int,3>{{1,3,5}},std::array<int,4>{{3, 1, 6, 5}}) ); @@ -310,6 +310,7 @@ void check_indexed_view() VERIFY_IS_APPROX( b({3, 1, 6, 5}), b(std::array<int,4>{{3, 1, 6, 5}}) ); VERIFY_IS_EQUAL( b({1,3,5}).SizeAtCompileTime, 3 ); +#endif #endif @@ -365,7 +366,6 @@ void check_indexed_view() VERIFY( is_same_eq( cA.middleRows<3>(1), cA.middleRows(1,fix<3>)) ); } -#endif // EIGEN_HAS_INDEXED_VIEW } void test_indexed_view() |