std.experimental.allocator and @nogc

Danni Coy via Digitalmars-d digitalmars-d at puremagic.com
Mon May 9 00:22:58 PDT 2016


> It's true but... why do you bother with IAllocator ? Everything can be set a
> compile time with a template parameter. As long as the param is a struct
> with allocate/deallocate/reallocate it's OK. you can use already a good part
> of the package content in a @nogc fashion.
>
> Do you have an example where IAllocator must be used and where, for example,
> Mallocator can't be passed ?!

How is that going to work in a situation where the code is in a
library that you are linking to rather than compiling?


More information about the Digitalmars-d mailing list