On Tuesday, 10 January 2023 at 12:55:34 UTC, Adam D Ruppe wrote:
On Sunday, 8 January 2023 at 18:42:58 UTC, Salih Dincer wrote:
I'm wondering 2 things; firstly, does having an enum mean
there is no auto-return? Or could it be CTFE?
It means nothing. The keyword tells the parser a function is
about to begin, which triggers return type inference (exactly
the same as `auto`), but otherwise it is completely ignored.
I'm curious about why it is allowed and whether we somehow could
use it for something meaningful since it really just is an alias
for auto right now.
Perhaps it could be used to create functions that only live at
compile-time.