Create a header which properly forwards eigen types
Submitted by Benjamin Schindler
Assigned to Nobody
Link to original bugzilla bug (#269)
Version: 3.0
Description
To reduce compilation time, I'd like to have the possibility to forward-declare eigen types. Eigen got quite expensive nowadays:
bschindl@hundertwasser ~/documents $ cat test.cpp
#include <eigen3/Eigen/Core>
bschindl@hundertwasser ~/documents $ g++ -E -o test.cpp.o test.cpp
bschindl@hundertwasser ~/documents $ wc -l test.cpp.o
56644 test.cpp.o
So basically, 56k lines of code by including eigen only - that's a lot. Of course, quite a bit of it is shared (i.e. comes from stl headers but still).
There is Eigen/src/Core/util/ForwardDeclarations.h, but eigen files are not self-contained unfortunately (i.e. to include it, I'd have to do:
namespace Eigen { #include <....> }
but Eigen/Core does a lot more preprocessor stuff to make this just work, so currently there is no easy solution