On 17/02/2015 07:28, weaselcat wrote:
Would RefCounted!T being @nogc help alleviate this issue?
I think Andrei once said that was a good solution for exceptions.
I think the stumbling block is that if T contains indirections,
RefCounted calls GC.addRange on the T*, which currently violates @nogc.
Perhaps addRange should be allowed even with @nogc, as it doesn't
trigger collections as of itself.
Otherwise, we would need some way of controlling whether addRange should
be called by smart pointers or not.