New enum features

torhu no at spam.invalid
Mon Jan 7 09:16:04 PST 2008


Sivo Schilling wrote:
> Is there a difference between an anonymous enum member and a manifest
> constant considering a string?

I tried it with an int array, seems that's broken too.  I'm hoping for a 
bugfix release soon, so we can try out the features properly. :)

---
import std.stdio;

enum int[] array = [1, 2, 3];

void main()
{
    writefln(array); // ok, prints [1, 2, 3]

    foreach (x; array)  // access violation with 2.009
       writefln(x);
}
---



More information about the Digitalmars-d mailing list