std.random question

tired_eyes via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun May 3 01:42:56 PDT 2015


Feels pretty silly, but I can't compile this:


import std.random;
auto i = uniform(0, 10);


DMD spits this:

/usr/include/dmd/phobos/std/random.d(1188): Error: static 
variable initialized cannot be read at compile time
/usr/include/dmd/phobos/std/random.d(1231):        called from 
here: rndGen()
/usr/include/dmd/phobos/std/random.d(1231):        called from 
here: uniform(a, b, rndGen())


Perhaps I'm missing something obvious?
dmd 2.067.1, openSUSE 13.2 x64


More information about the Digitalmars-d-learn mailing list