On 23.06.2017 06:27, MysticZach wrote:
On Friday, 23 June 2017 at 00:17:23 UTC, Steven Schveighoffer wrote:
We can call that contextual "keyword" result. Doesn't have to be a
keyword, just the implied return value symbol name.
Another problem is that any given contextual reserved identifier you
choose will run the risk of shadowing other variables. `result` could
easily already be defined in an outer context. A solution to this is to
use a variable starting with `__`, as those are the existing way of
defining reserved identifiers. Maybe `__result`?
out{ assert(__result>0); } actually works already, but I think it is
undocumented. ;)