[cfe-dev] "Automatic explicit" template instantiation?

Bouman, N.J. via cfe-dev cfe-dev at lists.llvm.org
Sun Jan 6 04:56:10 PST 2019


Dear Clang developers,

In order to get better re-compilation speeds for heavily templated code,
it is sometimes suggested to move the definition of a template out of a header file, and use explicit instantiation.

It seems that IBM’s C++ compiler features a technique (“tempinc”) that can generate such explicit instantiations automatically, as long as the developer adheres to some rules. See, for example: http://www.msg.ucsf.edu/local/programs/IBM_Compilers/C:C++/html/compiler/ref/tutmplat5.htm

Note that I have never used the IBM compiler and its “tempinc” technique myself,
but I was wondering whether people on this list are familiar with and/or have experience with this technique and whether it has been considered for inclusion into Clang (or why it was rejected).

Kind regards,
Niek J Bouman



More information about the cfe-dev mailing list