mlimber wrote:
Errors associated with templates
are notoriously verbose and often cryptic (STLFilt not withstanding),
and they make me wish [that] I could have the compiler
emit the code generated from templates
so [that] I could more easily see what was wrong.
It would be similar to examining the output of the preprocessor to debug macros.
I don't know of any compiler that does this, however.
Take a look at
The C++ Scalar, Vector, Matrix and Tensor class Library
http://www.netwood.net/~edwin/svmtl/
The genclass shell script
svmtl/bin/genclass
is a customized version of the original genclass script
written by Doug Lea.
We used this script for generic programming
before Bjarne had a proper implementation of templates.
It can't do all of the things that templates can do
but it does create human readable output that you can debug.
Most compilers have an option (gcc -E for example)
that displays the output from the C preprocessor (cpp)
before it is passed to the C++ compiler proper.
This output includes all of the macro substitutions
and allows you to debug macro definitions.