non empty slices

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 2 16:44:49 PDT 2016


On 06/03/2016 01:35 AM, ag0aep6g wrote:
> The alternative `peek` method is not documented to throw an exception,
> but it's not @nogc either. No idea why. Maybe Algebraic does GC
> allocations internally. I wouldn't know for what, though. Or it misses a
> @nogc somewhere.

I've looked at the source to see if it's something simple, and 
Algebraic/VariantN seems to be terribly complicated. Writing a simpler 
@nogc tagged union may be easier than fixing the phobos one, if the 
phobos one can even be made @nogc.


More information about the Digitalmars-d-learn mailing list