@nogc, exceptions, generic containers... Issues.

Brian Schott via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 8 13:09:32 PDT 2014


On Monday, 8 September 2014 at 15:55:53 UTC, monarch_dodra wrote:
> A *possible solution* to this problem would be to add an extra 
> parameter to these templates called "ScanGC", which would be 
> initialized to "hasIndirection!T". EG:
> struct Array(T, bool ScanGC = hasIndirections!T)
>
> Does this seem like a good idea? I don't really see any other 
> way around this if we want generic code with manual memory 
> management, that is "GC friendly" yet still useable in a @nogc 
> context.

This is the strategy that the EMSI containers project uses.

This thread is related: 
http://forum.dlang.org/thread/ypbbtgyqsmspvbojghet@forum.dlang.org


More information about the Digitalmars-d mailing list