3 ms·
>Both make an heavy use of templates, so that they cannot be compiled separately but instead literally copied into each of my source file by the C++ preprocesso
by nurettin 11y ago
>Both make an heavy use of templates, so that they cannot be compiled separately but instead literally copied into each of my source file by the C++ preprocessor (the details are not exact, but this should provide a fair representation of what’s really happening)
it really doesn't. Template resolution and preprocessing step are separate, both performed by different binaries in your toolchain.
- jabl 11y agoIf you wanna nitpick, at least GCC doesn't use a separate preprocessor binary anymore, the preprocessor is integrated into the compiler binary. You're of course correct in that preprocessing and template resolution are separate steps in the compilation process, but his underlying point still stands, namely that a large reason why C++ compilation is slow is the need to include reams and reams of code.