Constness in block expressions changed behavior
Submitted by Simon Praetorius
Assigned to Nobody
Link to original bugzilla bug (#1410)
Version: 3.3 (current stable)
Description
When converting a matrix into an array and extracting a block-view afterwards, the behavior is changed due to const-properties from 3.2.x to 3.3.x:
Example:
using Matrix = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>;
Matrix const m(10,10);
auto a = m.array();
auto r = a.row(1); // error: invalid conversion from `const double*` to `double*`
The code works find in 3.2.x but not in 3.3.x. If I change auto a = ... to auto const a = ... all is fine in 3.3.
I have not found a note in the changelogs or this bug-tracker that addresses this issue, but maybe I just missed it.
What is the correct behavior? The old one, or the new one, i.e. should it be auto const a = ...?
Edited by Eigen Bugzilla