Re: [eigen] Commenting issue #110, disabling operator[] for matrices

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


2010/4/22 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>
>
> In data giovedì 22 aprile 2010 14:34:05, Benoit Jacob ha scritto:
>>    matrix[i,j]
>>
>> which in c++ compiles as
>>
>>    matrix[i]
>
>
> (nitpicking mode on)
>
> Isn't it rather matrix[j] ?
> I thought the coma operator evaluated as the last, not first element.

You are right, as confirmed by this test program.

#include <iostream>

int main()
{
  int i = (1,2);
  std::cout << i << std::endl;
}


>
> ++
> Thomas
> --
> Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
> http://www.freehackers.org/thomas
>
>
>



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