@safe containers with std.experimental.allocator
bitwise via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jan 20 20:01:06 PST 2017
On Saturday, 21 January 2017 at 02:47:49 UTC, bitwise wrote:
> [...]
I can see that 'TypedAllocator' exists, but with a different
interface than the rest of the allocators. Why wouldn't all
allocators just have a common interface? Why wouldn't Mallocator
take a template parameter allowing usage with 'ubyte' or 'void'
for uninitialized memory via 'allocate' or
'allocateUninitialized' functions?
For my own purposes, I would need my containers to have a default
allocator(like Mallocator), and support an aligned
allocator(doesn't seem to be present in std.experimental).
More information about the Digitalmars-d
mailing list