[eigen] leftCol(0)

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


Hi everyone.
I was trying some code while writing the Block operations tutorial and found that the output of the following program does not make much sense:

#include <Eigen/Dense>
#include <iostream>
  
using namespace Eigen;
  
int main()
{
   Matrix<float,3,3> m;
m << 1,2,3,
    4,5,6,
    7,8,9;
    
std::cout << m.leftCols(0) << std::endl;
    
    return 0;
}

I wonder if this is a desired behaviour. I was expecting to get a compile-time error, or at least a run-time one.

Carlos


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