▲ 17 ▼ Efficient C++: The hidden compile-time cost of auto return types (andreasfertig.com) submitted 1 year ago by andreasfertig@programming.dev to c/cpp@programming.dev 10 comments fedilink hide all child comments
[–] LodeMike@lemmy.today 3 points 1 year ago (2 children) Nuter one of the main reasons for headers: documentation. permalink fedilink source parent hideshow 2 child comments replies: [–] entwine@programming.dev 2 points 1 year ago (1 child) 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>.... permalink fedilink source parent hideshow 1 child comment replies: [–] LodeMike@lemmy.today 1 point 1 year ago 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. permalink fedilink source parent
[–] entwine@programming.dev 2 points 1 year ago (1 child) 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>.... permalink fedilink source parent hideshow 1 child comment replies: [–] LodeMike@lemmy.today 1 point 1 year ago 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. permalink fedilink source parent
[–] LodeMike@lemmy.today 1 point 1 year ago 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. permalink fedilink source parent