Hi all, Not sure if this is really a bug, but I detected a compiler error for Array wrapper in Eigen 3.3 that did not occur in Eigen 3.2.x. A minimal example to reproduce the issue is given below: ======================================================================== #include <Eigen/Core> template <typename Derived> double colsum(const Eigen::MatrixBase<Derived>& x) { return x.array().sum(); } int main() { Eigen::MatrixXd x = Eigen::MatrixXd::Random(5, 5); double r = colsum(x.col(0)); return 0; } ======================================================================== The code works fine with Eigen 3.2.10 but generates the following error with Eigen 3.3-rc1: ######################################################################## ./Eigen/src/Core/ArrayWrapper.h:83:48: error: binding ‘const Scalar {aka const double}’ to reference of type ‘Eigen::ArrayWrapper<const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true> >::Scalar& {aka double&}’ discards qualifiers return m_expression.coeffRef(rowId, colId); ^ ######################################################################## GCC version is 6.2.1.
Fixed: https://bitbucket.org/eigen/eigen/commits/3c986dbcba0c/
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1333.