Re:Modern C++ Programming Course
by fluoridation on Tuesday November 28, 2023 @02:55PM
(#38450375)
That's not why. Template processing happens during processing of the translation unit, so it would be expensive even if you only had a single TU in your build. It's true that a template has to be reprocessed for each instantiation, however, that's not merely from one TU to the next, but even inside each TU! For every distinct value of T for std::vector<T> in a single TU, the compiler has to process and generate std::vector entirely
[ Parent
| on HN ]
There are no comments on this comment yet.