Idioms you use
anonymous via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 29 05:52:34 PDT 2015
On Monday 28 September 2015 23:40, Freddy wrote:
> Are any D idioms you use that you like to share?
> Heres one of mine
> ---
> enum ctfe =
> {
> return 0xdead & 0xbad;
> }();
> ---
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?
More information about the Digitalmars-d
mailing list