I was wondering if there is a way to use a C++ compiler to just produce C++ code where all templates have been expanded to the instantiations that are required by the progra
Templates are part of the language, not some pre-processor pass - they are processed by the compiler, just like other code.
There is no way to do this in Visual Studio 2012 (Property -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocess to a File - won't give you expanded templates).
The g++ has a bunch of debug options. I would try -fdump-class-hierarchy
(not tested).