On 5/9/12, Andrei Alexandrescu <[email protected]> wrote: > http://www.reddit.com/r/programming/comments/telhj/voldemort_types_in_d/
"Sorry, that won't work, the compiler will not allow a Voldemort Type
to be instantiated outside of its scope (the technical reason is it
has no reference to the seed local variable)."
Actually you can, although this should probably be disallowed:
import std.traits;
alias ReturnType!(generator) Gen;
Gen gen;
void main()
{
writeln(gen.front); // access violation
}
