Skip to content

Template Instantiation Compared: The Code the Compiler Writes for You ​

You write a template once; the compiler prints one copy per type used. This topic compares the printed code, the linker’s deduplication, the explicit-instantiation switches, and the unit at which class templates instantiate. The compile-time mechanism of templates comes apart into exactly these pieces.

pdf-latest-41-gc317b3f · c317b3f · 2026-10-24