bugfix: issue #2375
Reference issue
Fixes #2375 (closed)
What does this implement/fix?
Fixed indexed views for indices of non Eigen, non built-in types (e.g. std::array)
Additional information
The underlying problem was with the way strides were being computed in the traits class for indexed views. When the increment value for the supplied index was undefined (as with e.g. std::array), the stride value was computed as the product of the undefined increment value (i.e. 0xfffffe) and the expression stride. Since nothing in the test suite depends on this stride value, this went unnoticed (perhaps this value is altogether irrelevant for indexed views?). However, for sufficiently large (i.e. 129 or more) values of the expression stride, the aforementioned product resulted in a signed integer overflow, which gcc detected at compile time. The fix consisted of explicitly checking for and undefined increment value and setting the stride to Dynamic when it was detected.