[Issue 9339] std.random.uniform!Enum should return random enum member
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 12 17:38:48 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9339
--- Comment #21 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-12 17:38:45 PST ---
(In reply to comment #20)
> One test case to try:
>
>
> import std.bigint, std.random;
>
> enum Foo : BigInt {
> zero = BigInt(0),
> one = BigInt(1)
> }
>
> void main() {
> auto x = uniform!Foo();
> }
It works. It should actually work with any enum base types, since the only
requirement is that the type is an enum.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list