3 ms·
> To me, this reflects the sad state of building cross-platform C++ dependencies; headers are the only things that library developers are confident that their u
by geezerjay 8y ago
> To me, this reflects the sad state of building cross-platform C++ dependencies; headers are the only things that library developers are confident that their users will be happy with.
...or that the code uses templates extensively (it's boost after all) thus everything must be placed in the same compilation unit so that the code can be generated at compile time.
- josefx 8y agoEven with templates you could split of declaration and implementation. That would help with reducing compile times at the cost of having the user explicitly instantiate the used variations in some central location.
- geezerjay 8y ago> Even with templates you could split of declaration and implementation. No, you can't. The only case where the declaration of template functions/classes can be separated from definitions is in the rare cases where only a fixed and predetermined set of objects/values are used, thus enabling explicit instantiation.
- josefx 8y agoAnd it is not possible to leave that choice to the user? Sometimes I wouldn't mind explicitly instantiating the few variations I need if it meant faster compile times for the remaining files.