▲ 19 ▼ Efficient C++: The hidden compile-time cost of auto return types (andreasfertig.com) submitted 11 months ago by andreasfertig@programming.dev to c/cpp@programming.dev 13 comments fedilink hide all child comments
[+] Lembot_0004@discuss.online 5 points 11 months ago* (last edited 9 months ago) (1 child) [deleted] permalink fedilink source parent hideshow 2 child comments replies: [–] LodeMike@lemmy.today 3 points 11 months ago (1 child) Nuter one of the main reasons for headers: documentation. permalink fedilink source parent hideshow 2 child comments replies: [–] entwine@programming.dev 2 points 11 months 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 2 child comments replies: [–] LodeMike@lemmy.today 1 point 11 months 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 3 points 11 months ago (1 child) Nuter one of the main reasons for headers: documentation. permalink fedilink source parent hideshow 2 child comments replies: [–] entwine@programming.dev 2 points 11 months 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 2 child comments replies: [–] LodeMike@lemmy.today 1 point 11 months 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 11 months 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 2 child comments replies: [–] LodeMike@lemmy.today 1 point 11 months 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 11 months 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