Re: [eigen] proposal to use static const integer class members instead of enum values

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


Hi

> The main goal of deriving from integer_constant is to have only one class
> that needs the definition, as long as the constant is always called value..
> But since in Eigen the constants can have many, many different names
> (IsColVector, ExpandMem, RowsAtCompileTime, OuterSize, etc) it wouldn't
> gain much if anything.

Well, wouldn't you then just have all these constants be derived from
integral_constant (in C++11-speak) and then call IsColVector::value etc.?

That's what I'm doing in our C++11 codebase, but mixing between the two styles
is a bit annoying, so I often create an integral_constant for an Eigen-enum, e.g.
SizeAtCompileTime.

As a slight aside, I'm looking forward to a much simplified Eigen4 that is allowed to use
C++11 features... ;-)

Best regards

Daniel Vollmer

--------------------------
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
German Aerospace Center
Institute of Aerodynamics and Flow Technology | Lilienthalplatz 7 | 38108 Braunschweig | Germany



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