Allocators and Containers
Basile B. via Digitalmars-d
digitalmars-d at puremagic.com
Thu Feb 16 09:31:25 PST 2017
On Thursday, 16 February 2017 at 15:37:52 UTC, Minty Fresh wrote:
> A lot of the usefulness of the std.experimental.allocators
> module is lost because no other part of the stdlib actually
> ties into the functionality provided by it.
>
> For example, the Array type defined in std.container relies on
> malloc() directly, so if you wanted to use a type to replace
> built-in arrays with a custom allocator, you'd need to
> implement your own container type.
>
> Would it make sense to allow the std.container types to accept
> IAllocator instances, and to allow custom allocators? (Using
> Mallocator by default.)
Appender also, although there some WIP for a complete @nogc
version (which I'd prefer to be based on allocators too, but well
not possible b/c of the reasons mentioned above).
More information about the Digitalmars-d
mailing list