Re: [eigen] operator== (and probably others) for 0-sized Eigen-types

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


On 11.11.2013 23:59, Gael Guennebaud wrote:
I cannot reproduce the compilation issue with both gcc and clang. Here is
what I tested:

#include <Eigen/Core>
#include <iostream>
int main() {
   Eigen::Matrix<double, 1, 0> A, B;
   std::cout << (A == B) << "\n";
};

The problem arises if the number of RowsAtCompileTime is zero:

/Users/maven/Development/dlr/dx/negev/thirdparty/eigen-3.2.0/Eigen/src/Core/BooleanRedux.h:21:11:
error: expression is not an integral constant expression
     col = (UnrollCount-1) / Derived::RowsAtCompileTime,
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The fix won't be too complicated, I just did not care enough yet ...
If there are no objections against [].all()==true && [].any()==false, I can implement that this week (unless someone is faster).

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/