www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14432] New: move construction for RefCounted

https://issues.dlang.org/show_bug.cgi?id=14432

          Issue ID: 14432
           Summary: move construction for RefCounted
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: code dawg.eu

It's currently not possible to use non-copyable structs that model unique
ownership of a resource with RefCounted to share ownership.

This should work similar to how a unique_ptr in C++ can be converted to a
shared_ptr, and makes unique ownership a viable default for resources such as
files.

--
Apr 09 2015