@safe containers with std.experimental.allocator

bitwise via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 26 17:06:31 PST 2017


On Sunday, 22 January 2017 at 13:21:41 UTC, Andrei Alexandrescu 
wrote:
> -- Andrei

After exploring this idea(@safe containers), then looking at 
std.Array again, it's actually pretty smart. I had concerns about 
efficiency, but RefCounted seems to force allocation like 
make_shared<>, eliminating the access overhead I thought was 
present. It doesn't look like RefCounted will work once 
allocators are introduced, but you seem to already be working on 
generalized ref-counted buffers. Well played, sir.

I decided to make my own containers classes, in the hopes that 
one day, I can just slap @rc in front of them and be done with 
the GC.


More information about the Digitalmars-d mailing list