Missing Aliasing assert or a bug
Submitted by Hordur Johannsson
Assigned to Nobody
Link to original bugzilla bug (#291)
Version: 3.0
Description
VectorXd a(2);
a << 1,2;
a = a.segment(0,1);
cout << a;
outputs:
0
using eval fixes the bug.
a.segment(0,1).eval()
If this is the expected behaviour it would be useful to have an aliasing assert for this case.
Edited by Eigen Bugzilla