Re: [eigen] Question about ColMajor vs. RowMajor

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


> For example, if people misuse the () operator and are not reading
> the documentation properly, then every time someone upstream
> adds the -DEIGEN_DEFAULT_TO_ROW_MAJOR flag, their code
> will break in horrible ways without a single warning.
>
> ...
>
> I am still a bit conflicted on what to tell users.

If the storage ordering of the matrix matters for one of your users'
uses of operator(), add some compile-time assertions to check that the
incoming types are indeed row or column major.  Those regions should
have such asserts anyhow to make the storage requirements
self-documenting.

There's no fairy dust that can protect people from these types of mistakes.

- Rhys



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