Q: template instantiation

Niku Kaitaniemi niksa@uta.fi
Sat Aug 22 06:01:00 GMT 1998


What is the optimal way of instantiating templates, measured by
compile time and g++ memory usage?

I am currently instantiating templates explicitly the way I did with g++
v2.7.2. I include only template declarations in normal source files, which
are compiled with -fno-implicit-templates. Then I have at least one
template instantiation source file, that includes template definitions and
explicitely instantiates all templates used in the project and is compiled
without -fno-implicit-templates.

-- 
"This code is guaranteed."  - Famous last words
niksa@uta.fi




More information about the Gcc mailing list