On Wednesday, 9 September 2015 at 20:17:44 UTC, cym13 wrote:

This is subtly missing the main question: isn't C++-like memory management of D classes possible with Unique, RefCounted and Scoped?


- Unique

C++ has move semantics which make moves explicit. D's Unique is more like the deprecated C++'s auto_ptr: it has an opAssign overload that changes the owner.

- RefCounted

Only for D structs. std::shared_ptr works for all.



Reply via email to