[eigen] Minor lint-issue (may inconsistence) in declaration of class ArrayWrapper, ArrayBase

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


Hi!

After updating of PC-lint (to version 9.00L) and checking our C++-sources, I've received
an internal error (from lint) about macro EIGEN_INHERIT_ASSIGNMENT_OPERATORS in
template-class ArrayWrapper (file ArrayWrapper.h, line #41).

Note: Eigen Library 3.2.2 !


After some investigations, I've determined some minor differences - assuming:
a) Declaration of ArrayWrapper and MatrixWrapper are  similar, and
b) the base-classes ArrayBase vs. MatrixBase are nearby comparable.

At least - my (IMHO) summary:

The causing issue is, that within the declaration of template-class ArrayBase - line # 77 -
the using-directive
    using Base::operator=;
is used.

Replacing this line by "using Base::eval;" - like in MatrixBase - will satisfy lint, but breaks compile!

Currently I will use an work-around:  a lint macro-override for EIGEN_INHERIT_ASSIGNMENT_OPERATORS;
Lint is happy, if this contain only the using statement and no definition of a assignment.operator.


Additionally I've determined a noticeable difference between declaration MatrixWrapper and ArrayWrapper:

The type Base (within template-class MatrixWrapper) is an alias of "MatrixBase<MatrixWrapper<ExpressionType> >"; Ie. the base-class
BUT, the type ArrayWrapper::Base isn't the used base-type!

Should
        typedef ArrayBase<ArrayWrapper> Base;
replaced by
        typedef ArrayBase<ArrayWrapper<ExpressionType> > Base;
???

Using this replacement has no effect (on lint or compile-process with GCC 4.1.2, 4.6.4 and VS2010).

Best regards from Salzburg,
DI M. Eisenmann


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