Change order of multiple inheritance

Submitted by panda-34

Assigned to Nobody

Link to original bugzilla bug (#697)
Version: 3.2
Operating system: Windows

Description

In a typical use of multiple inheritance in Eigen:
class CwiseBinaryOp : internal::no_assignment_operator, public CwiseBinaryOpImpl<...>
sometimes the dummy class (no_assignment_operator) comes first, which leads to suboptimal code generation by Intel Compiler. Every time it needs type casting (which is always) it injects code for null-pointer adjustment, ( if (this==1) this = 0; ) even for stack variables. Simply by reordering the inheritance order such that the dummy class is the last, this problem goes away (and there's a small but noticeable reduction in generated code size).

Blocking

#558 (closed)

Edited by Eigen Bugzilla