On Sunday, 9 April 2017 at 15:52:50 UTC, Basile B. wrote:
On Sunday, 9 April 2017 at 08:56:52 UTC, Atila Neves wrote:
Using std.experimental.allocator? Tired of writing
`scope(exit) allocator.dispose(foo);` in a language with RAII?
I think that the Array misses
- a reservation strategy, something like reserve() and
- dup / idup that return new distinct and deep copies.
- maybe .ptr at least for reading with pointer arithmetic.
- opBinary for "~" . Also you have bugs with operators:
Thanks for the suggestions.
UniqueArray!(int, Mallocator) a;
a ~= [0,1];
Fixed now, thanks.