[Issue 12100] __GENTYPE to generate ever different types

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Apr 23 14:02:04 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12100

--- Comment #5 from monarchdodra at gmail.com ---
(In reply to Andrej Mitrovic from comment #1)
> How about __uniqueID, which would create a unique string ID? I'd imagine
> this would be more useful since it's more generic, and you could easily
> create a wrapper for it via:
> 
> -----
> template GENTYPE()
> {
>     mixin("struct %1$s { }; alias GENTYPE = %1$s".format(__uniqueID));
> }
> -----

Basically, we're asking for a static PRNG? In this particular case, the final
result is a string or type, but at the core, what we need is a compile time
PRNG?

--


More information about the Digitalmars-d-bugs mailing list