Draft: convert all traits to constexpr
Reference issue
What does this implement/fix?
This fairly stupid and fairly straightforward but massive patch converts almost all enum
s in the Eigen/src
subdirectory to constexpr
. This adds some typesafety (practically all are either int
or bool
, some are enum
types) and allows removing lots of casts to int
and bool
.
I've run a big chunk of the testsuite, but I'm sure that I missed a logical negation somewhere, it's just to easy to miss something.
Additional information
The formatting tries to keep the indent of the enum declarations mainly to minimize merge conflicts. I tried to steer away from removing enums at functions scope, but I noticed too late in a few places that I had changed a function. These changes shouldn't hurt, but they also are orthogonal.
I didn't touch the tests
and unsupported
directories. A final version of this would also have to update the documentation.