Hacker News new | ask | show | jobs
by gpderetta 1260 days ago
to be fair, C+ header only libraries full of advanced template metaprogramming will also slow down compilation by a few order of magnitude.
1 comments

I'm hopeful modules will come fast, they seem to fix that issue. Modules are already in C++20, but most compilers don't support them well enough yet.
I suspect they will help with the parsing, but not with template instantiation cost which dominates metaprogramming.
That is what external templates are for, pre-instantiate all common cases in a binary library.