Idioms you use
Cauterite via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 29 06:06:19 PDT 2015
On Tuesday, 29 September 2015 at 12:52:36 UTC, anonymous wrote:
> Why not just `enum ctfe = 0xdead & 0xbad;`?
>
> Are there cases where `enum foo = {return bar;}();` works but
> `enum foo = bar;` doesn't? And if there are, aren't they
> compiler bugs?
I'm pretty sure he's talking about the general use of an
anonymous function invocation assigned to an enum to force some
statements to be executed at compile time. His example was not
very illustrative though.
More information about the Digitalmars-d
mailing list