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

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |INVALID

--- Comment #1 from RazvanN <[email protected]> ---
I don't this is possible. Think about reference counting. Maybe T is a
reference counted object. Once you call bar you need to update the number of
references that point to the object (you don't know what bar is going to do,
maybe it will escape the object in some variable), so you cannot avoid calling
the posblit/copy constructor.

I think that the correct way to go about this is to properly implement move
constructors and devise a last use dataflow analysis strategy that will allow
us to properly implement perfect forwarding.

I suggest closing this as invalid.

--

Reply via email to