Re: [eigen] Re: leftCol(0)

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


2010/6/26 Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Both versions should have the effect of printing anything, but they

of NOT printing anything, of course

> should be allowed (we try to allow zero sizes for convenience)
>
> Can you file a bug on the tracker? No time now to fix it.
>
> Benoit
>
> 2010/6/26 Carlos Becker <carlosbecker@xxxxxxxxx>:
>> Another remark: doing std::cout << m.leftCols<0>() << std::endl; ends up in
>> a segfault at compile time.
>>
>>
>> On Sat, Jun 26, 2010 at 12:25 PM, Carlos Becker <carlosbecker@xxxxxxxxx>
>> wrote:
>>>
>>> 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/