19
Efficient C++: The hidden compile-time cost of auto return types
(andreasfertig.com)
The center for all discussion and news regarding C++.
Do what? Use auto? As I understand that is just an alternative to templates for trivial cases.
Nuter one of the main reasons for headers: documentation.
I think you're conflating regular auto use with using it as a return type/argument. The latter is syntactic sugar for declaring a template. It isn't any less "documented" than doing a
template<class ReturnType>...
.Having the return type name is absolutely better documented. But I guess were splitting hairs because its a hard typed language and lexers can find what it is anyway.