Re: [eigen] CV qualification of template parameters

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


Hi,

I guess you are referring to types such as Transpose<MatrixXd> versus Transpose<const MatrixXd>. Here, the const qualifier tells us whether the nested object is a lvalue or const. In the former case, the nested matrix will be stored by reference as:

MatrixXd &m_nestedMatrix;

and a const reference otherwise:

const MatrixXd &m_nestedMatrix;

Hope that helps?

gael



On Fri, Mar 25, 2016 at 6:45 PM, Cedric Doucet <cedric.doucet@xxxxxxxx> wrote:

Hello,

I've noticed that some template parameters are cv-qualified in Eigen.
For example, some template parameters are declared const.

Could you explain me what is the role of the const keyword here?

Cédric



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