learnbyexample@programming.dev to Linux@lemmy.mlEnglish · 2 months ago$HOME, Not So Sweet $HOMEgist.github.comexternal-linkmessage-square11fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-link$HOME, Not So Sweet $HOMEgist.github.comlearnbyexample@programming.dev to Linux@lemmy.mlEnglish · 2 months agomessage-square11fedilink
minus-squareschnurrito@discuss.tchncs.delinkfedilinkarrow-up0·2 months agoTIL that you can declare return types this way in C++.
minus-squareqaz@lemmy.worldlinkfedilinkEnglisharrow-up0·2 months agoI never understood why they added that
minus-square_____@lemm.eelinkfedilinkEnglisharrow-up0·2 months agobecause explicitly declaring types can be redundant, if the compiler knows a lot of the times you should also know also because some types are extremely cursed: see std views/ranges
Looks like C++.
TIL that you can declare return types this way in C++.
I never understood why they added that
because explicitly declaring types can be redundant, if the compiler knows a lot of the times you should also know
also because some types are extremely cursed: see std views/ranges