D's equivalent to C++'s std::move?

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 4 00:50:20 PST 2016


On Thursday, 4 February 2016 at 02:33:06 UTC, Andrei Alexandrescu 
wrote:
> On 02/03/2016 09:01 PM, Matt Elkins wrote:
>> [code]
>> unittest
>> {
>>      alias RH = ResourceHandle!(uint, (uint) {});
>>      RH[] handles;
>>      handles ~= RH(5); // Compile error: ResourceHandle is not 
>> copyable
>> because it is annotated with @disable
>> }
>> [/code]
>
> Got it, thanks. That's a bug in the implementation, no two ways 
> about it. No copy should occur there, neither theoretically nor 
> practically. Please report it to bugzilla at 
> http://issues.dlang.org. Thanks very much! -- Andrei

  Something like a week ago i sorta was awaiting confirmation of a 
bug VERY similar to this one, from this thread posting:

  http://forum.dlang.org/post/iahbnmcbtsdolczaqkta@forum.dlang.org

  The related bug reported (not a exact match, but close enough) 
is also present

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



More information about the Digitalmars-d mailing list