[eigen] Discrepancy between 3.1.4 and 3.2.0 behavior on a snippet

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi all,

Going from 3.1.4 to 3.2.0 we saw an assertion trip in our code base
where it hadn't previously.  The minimal recreate is as follows:

#include <iostream>
#include <Eigen/Core>

int main(void)
{
    using namespace std;
    using namespace Eigen;

    typedef Array<double, Dynamic, Dynamic, ColMajor> array_type;
    array_type A = array_type::Random(3, 5);
    cout << A << endl << endl;

    // Eigen 3.1.4 is cool with the following statement, somehow.
    //
    // Eigen 3.2.0 fails an assert at src/Core/PlainObjectBase.h:238
    // with "Invalid sizes when resizing a matrix or array."
    // on GCC 4.4.6.  Similar behavior observed on GCC 4.6.3, 4.7.3, 4.8.0.
    const VectorXd& b(A.row(2));
    cout << b << endl << endl;

    return 0;
}

I'm not claiming that either the observed 3.1.4 or 3.2.0 behavior is
correct.  Just that, to first order, it feels wrong that the two Eigen
versions produce different runtime behavior.

Thoughts?

- Rhys



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/