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

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


On 24.10.2014 10:27, GMC Software Development wrote:
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).

From your description, this appears to be a lint bug. Have you reported the issue to them?

Note: Eigen Library 3.2.2 !

Just out of curiosity: Does the development branch work?

After some investigations, I've determined some minor differences -
assuming:
a) Declaration of ArrayWrapper and MatrixWrapper are  similar, and

Actually, this has a lot of code-duplication. Maybe we should implement a common base which could also be used, e.g., by NestByValue or Flagged.

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!

For some reason MatrixBase re-implements operator= for DenseBase and EigenBase, while ArrayBase simply uses Base::operator=. I have no idea why that is the case, but it makes using Base::operator= mandatory in ArrayBase at the moment.



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

Those are equivalent inside
  template<typename ExpressionType>
  class ArrayWrapper { ...};

I'm not sure which is preferable -- the first is shorter, the second might be more clear. OTOH, the name `Base` makes it pretty clear already what this type is supposed to be. So if at all, I'd rather remove the redundant <ExpressionType> in MatrixWrapper (I guess there are similar cases, elsewhere).


Christoph


--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



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