The problem is that
Everything WAS header only in the first place. Then we ran into slow compilation
times and troubles with Windows toolchains crashing (and maybe other issues?).
You'll have to get more help from Daniel and/or Marcus on the justification
for what's there now --- they both understand the build process much better than
I do.
If var_stack is the only thing left, you should just be able to include the .cpp
like it was a .hpp file. If it has a header guard, that is. Adding a header
guard won't hurt it if it doesn't.
The most general way to lay things out is to create three parallel files:
.hpp header
.def.hpp header-only definitions
.cpp instantiations
Then we can have our cake and eat it, too. To use the lib header only, you
include def.hpp. To build it, you use .cpp and then for code that links to it,
include .hpp. It's the code pattern you see in the parser. It's discussed
in Vandevoorde and Josuttis's most excellent C++ templates book.
- Bob