On Friday, 17 April 2015 at 14:05:26 UTC, Ozan Süel wrote:
Why I'm asking: I want to create class instances with an unique id as default.
But now that great idea seems to be a death end.

Sounds like your code is something like:

class foo {
    auto myid = randomUUID();
}

The compiler requires that myid be initialized with a compile time value in this instance, which can not be obtained by randomUUID().

You'll need to use a constructor:

this() {
    myid = randomUUID();
}

Reply via email to