learnbyexample to [email protected]English • 20 hours ago$HOME, Not So Sweet $HOMEgist.github.comexternal-linkmessage-square23fedilinkarrow-up180arrow-down16cross-posted to: [email protected][email protected][email protected]
arrow-up174arrow-down1external-link$HOME, Not So Sweet $HOMEgist.github.comlearnbyexample to [email protected]English • 20 hours agomessage-square23fedilinkcross-posted to: [email protected][email protected][email protected]
minus-square@[email protected]linkfedilink1•5 hours agoThey’re useful for templates because the trailing version is resolved later
minus-square@[email protected]linkfedilinkEnglish3•8 hours 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
minus-square@[email protected]linkfedilink6•10 hours agoAmong other things it lets you define the return type in terms of the arguments to the function.
I never understood why they added that
They’re useful for templates because the trailing version is resolved later
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
Among other things it lets you define the return type in terms of the arguments to the function.