[eigen] compilation error, 3.3rc2 and MS VS2013

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


I have some code that compiles correctly with 3.2.9 but not with 3.3rc2.
I've managed to reproduce the problem with the following simple test:

typedef Eigen::MatrixXd DenseMat;
typedef Eigen::VectorXd Vector;
typedef Eigen::SparseMatrix<double> SparseMat;
void icTestSparseSimple()
{
  typedef Eigen::SparseQR<SparseMat, Eigen::COLAMDOrdering< SparseMat::Index >> SparseQR;
  const int n = 4;
  DenseMat a(n, n);
  a <<
    1, 0, 0, 0,
    -30, 60, -30, 0,
    0, -30, 60, -30,
    0, 0, -30, 30;
  SparseMat as = a.sparseView();
  SparseQR qr(as);
  cout << "R\n" << qr.matrixR() << endl;
  int rnk = qr.rank();
  cout << "rank=" << rnk << endl;
  auto R11 = qr.matrixR().topLeftCorner(rnk, rnk)..triangularView<Eigen::Upper>();
  cout << "R11\n" << R11 << endl;
}

I get many error messages complaining about the line starting with "auto R11".
I'm wondering if this code is "bad" for some reason and I was simply lucky
in 3.2.9 or if this is a problem with 3.3.

Thanks,

Bill Greene



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