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
We had something like that at the beginning of Eigen, but in practice the gain on compilation times was really small. You can try by copying Eigen/Core and removing everything after ForwardDelcarations.h. A better solution is to use precompiled headers. So I'd say wontfix.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/269.