hap.random: a new random number library for D

Joseph Rushton Wakeling via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Jul 13 09:29:10 PDT 2014


On Sunday, 13 July 2014 at 16:20:12 UTC, Joseph Rushton Wakeling 
wrote:
> I'm guessing the reason it doesn't in this case is because it's 
> all wrapped up in the scoped() template

... no, it's because the private Scoped_store is passed out via 
the Scoped_payload property.

Anyway, the actual scoped() method itself is templated, so 
whether it can be @nogc or not obviously depends on its arguments 
and has to be inferred.  The trouble is with the destructor 
~this() which is in no way dependent on template parameters, but 
in calling the destructor of the scoped payload, depends on the 
payload's own destructor for whether it can be @nogc or not.


More information about the Digitalmars-d-announce mailing list