|
|
|
|
|
by amluto
490 days ago
|
|
> compile times C++, especially “modern” C++, can have truly horrible compile times. The lack of a usable module system makes it worse. Variadic templates helped some. Fold expressions will help some. I expect concepts and if constexpr and such to help some: relying on SFINAE never did the compiler any favors. But, in general, C++ template programming is quite nasty for compile times. |
|
C++ compile times can be as bad as Rust's or worse. It does depend on how you structure things and how much you use templates. You don't need to have 10 layers of "zero cost abstraction" around everything. But that is the "proper" way to use it and what is now taught, so there is a lot of it out there and the standard library does it pervasively.
Variadic templates don't fix much compared to just writing straight line code or doing a tiny bit more work at runtime using stdarg.h.