@safe containers with std.experimental.allocator
bitwise via Digitalmars-d
digitalmars-d at puremagic.com
Sat Jan 21 09:14:24 PST 2017
On Saturday, 21 January 2017 at 16:28:16 UTC, Andrei Alexandrescu
wrote:
> alignedAllocate provides access to OS/clib-provided primitives
> for aligned allocation. Those don't require a special
> deallocation function, see e.g.
> http://en.cppreference.com/w/c/memory/aligned_alloc. -- Andrei
This makes sense, but then shouldn't alignedAllocate() be a free
function that could be used to make an aligned allocator?
Again, the point of an allocator is to provide a standard
interface for memory allocation. The user of which shouldn't have
to know how that memory was allocated, and I can't think of a
case where this would be desired either.
More information about the Digitalmars-d
mailing list