[eigen] nasty msvc compilation issue

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


Hi guys,

I am failing to fix the following issue. The little program below does
not compile:

#include <Eigen/Core>

using namespace Eigen;

void main()
{
  //MatrixXcd m;
  typedef Eigen::MatrixXcd MatrixType;
  typedef Eigen::Map< MatrixType > MapType;
  typedef Eigen::Block< MapType, Eigen::Dynamic, Eigen::Dynamic > BlockType;
}

The compiler tells me BlockType is undeclared. Ok, so let's forget
about the compiler issues and try to reason.

We are nesting a block and a map and the base classes are defined via
the MakeBase struct, e.g. for blocks, the base class is defined as

MatrixType::template MakeBase<
  Block<MatrixType, BlockRows, BlockCols, _DirectAccessStatus>
>::Type

My first guess was that MatrixType = Map is causing the issue since
Map does not offer the MakeBase struct - but then, Map derives from
MatrixBase<MatrixType> and there the struct is offered. So probably
the wrong guess.

The fun part is that as soon as I uncomment "MatrixXcd m;" everything
compiles just fine.

For the moment, I am out of ideas - any help would be great!

- Hauke

p.s. As usual default branch and msvc 2008 sp 1...



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