On Monday, 3 June 2013 at 16:47:35 UTC, Rob T wrote:
On Monday, 3 June 2013 at 16:01:29 UTC, H. S. Teoh wrote:
C++11 deprecated auto_ptr in favor of unique_ptr, but it's
basically the same concept, and it works very well in cases
where you prefer to manage your own memory. D should have the
same thing in the std lib, it's not difficult to implement. The
ref counted pointers are another similar thing, a bit more
difficult to implement correctly and there's a circular ref
issue with them.
There is this: http://dlang.org/phobos/std_typecons.html#.Unique
I can't comment how good it is though.