One-index coeff accessors should static_assert on LinearAccessBit
Submitted by Benoit Jacob
Assigned to Nobody
Link to original bugzilla bug (#1009)
Created attachment 570
coeff(Index) and coeffRef(Index), and corresponding operator()(Index) and operator, should probably require LinearAccessBit, right?
The attached testcase is how I came across this: I was mistakenly using operator()(Index) on a Block<MatrixXf>, so I was addressing coefficients outside of the block.
Also attaching a patch that does this static-assertion; but I can't push it at the moment, because it seems to be breaking lots of tests, and I don't currently have time to look into them...
Attachment 570, "minimal testcase":