aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/indexed_view.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-09-11 15:40:07 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-09-11 15:40:07 +0200
commit747c6a51ca36f2cb0d519b83a8a03191b283dfb2 (patch)
tree6c6900464960a6bcbf2ea9e233ff1abd77ed81d5 /test/indexed_view.cpp
parent031f17117d93d38d7078ef02892afdba549a265c (diff)
bug #1736: fix compilation issue with A(all,{1,2}).col(j) by implementing true compile-time "if" for block_evaluator<>::coeff(i)/coeffRef(i)
Diffstat (limited to 'test/indexed_view.cpp')
-rw-r--r--test/indexed_view.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp
index 5f1e01fc8..f40199c82 100644
--- a/test/indexed_view.cpp
+++ b/test/indexed_view.cpp
@@ -419,6 +419,12 @@ void check_indexed_view()
VERIFY_IS_EQUAL( A3(ind,ind).eval(), MatrixXi::Constant(5,5,A3(1,1)) );
}
+ // Regression for bug 1736
+ {
+ VERIFY_IS_APPROX(A(all, eii).col(0).eval(), A.col(eii(0)));
+ A(all, eii).col(0) = A.col(eii(0));
+ }
+
}
EIGEN_DECLARE_TEST(indexed_view)