3 ms·
There is also explicit instantiation: it's a language feature! Split the template into declarations and definitions, similar to .h versus .cc. Then #include t
by kazinator 8y ago
There is also explicit instantiation: it's a language feature!
Split the template into declarations and definitions, similar to .h versus .cc.
Then #include the definition into some module where you write template instantiations for all the needed types.
- gpderetta 8y agoPainful, but if you know that a template will be only instatiated for a finite set of types, it can be worth it.