From 747c6a51ca36f2cb0d519b83a8a03191b283dfb2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 11 Sep 2019 15:40:07 +0200 Subject: 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) --- test/indexed_view.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/indexed_view.cpp') 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) -- cgit v1.2.3