3 ms·
I agree a bunch with this. Templates can actually get really complicated quickly... In C++ if you want to generate the bytes to execute FooBar<string> then you
by munk-a 5y ago
I agree a bunch with this. Templates can actually get really complicated quickly... In C++ if you want to generate the bytes to execute FooBar<string> then you actually need to reference FooBar<string> somewhere in the code to signal its necessary inclusion and later compilation steps can't build this for other types on the fly.
If you have very generic and flexible templates defined in a static library the library needs to have actually forced the compilation for all the types you intend to use. So I do agree that templates remain a big pain!