19
Efficient C++: The hidden compile-time cost of auto return types
(andreasfertig.com)
The center for all discussion and news regarding C++.
If a function body is expensive to parse, isn't it then a complex function body that shouldn't go into the header anyways?
If it's templated / generic, which IIRC is one of the reasons to try and use auto, then it has to go in the header anyway.
technically it doesn't have to (you can always create a .tpp (which is still technically a header, i know, but it isn't a header header)), but i get what you mean
I mean it has to functionally be a header. Could even be a
.c
file, filename extensions stopped mattering before we even had C++03 and that's saying something!