
Sorry if this has been asked before. My impression is that this is the nature of templates, since code is being generated as objects are instantiated.
Are there guidelines for speeding up compilation/linkage of code that moderately/heavily uses templates? It seems to take a looooong time, even on a relatively modern development computer.
That's certainly true for libraries like xpressive / spirit / ublas that make heavy use of template metaprogamming and/or expression templates. Boost.Regex avoids this by moving most of the template instances you will likely use into the library (so they don't get instantiated in your object files), and precompiled headers are certainly a big win in this case.
Precompiled headers don't seem to help .... perhaps it is counter-productive to use precompiled headers with stl/boost? Or I'm ignorant about proper usage?
Are there vc7.1 / vc8 settings to speed up development? GCC?
About the only thing you can do is isolate the problem to one or two source files: for example by hiding the templates behind a non-template interface. If you're developing a parser with spirit then that's typically what you would do anyway, for other libraries it may be harder, or certainly less convenient to do that. John.