3 ms·
You can do the same for c++ with extern templates, just instantiate them with the needed types in one compilation unit and you only end up with a single set of
by kimixa 3y ago
You can do the same for c++ with extern templates, just instantiate them with the needed types in one compilation unit and you only end up with a single set of symbols, and codegen etc. only runs the once.
And C inline functions are instantiated and generated for every compilation unit that uses it - it just doesn't generate exported symbols in the resulting object file. Exactly the same as the "inline" keyword in c++.