UniquePtr in D

Timon Gehr timon.gehr at gmx.ch
Sun Dec 22 06:22:11 PST 2013


On 12/22/2013 03:19 PM, Timon Gehr wrote:
> On 12/22/2013 03:13 PM, Timon Gehr wrote:
>>>
>>> Is error 1 a bug? Because there should cleary not be any copy at this
>>> point.
>>> ...
>>
>> I don't think the conditions when a struct is moved are actually
>> documented beyond the NRVO case. I think it ideally would be a bug, but
>> this would require some kind of DIP.
>
> The main issue would probably be internal pointers in @safe code.

Scrap that, it would be disallowed to create them in @safe code anyway, 
and hence the memory corruption would be attributed to the @system code 
that created the pointer.


More information about the Digitalmars-d mailing list