On 5/27/16 1:42 PM, ArturG wrote:
On Friday, 27 May 2016 at 16:56:21 UTC, Steven Schveighoffer wrote:
Why are you expecting it to be?

Won't work for enums with first elements that are non-zero either:

enum foo : int {
 bar = 1;
}

foo f;

if(f) writeln("this will output too");



but by default it works you just changed the default so its ok that it
doesnt work.

I didn't change the default. The default is to pick the first member and use that as the init value. I may not have even considered what foo.init might be when I was creating my enum.

-Steve

Reply via email to