Movable resource handles

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 27 21:39:55 PST 2016


On Thursday, 28 January 2016 at 05:27:16 UTC, Era Scarecrow wrote:
> On Thursday, 28 January 2016 at 03:55:22 UTC, Matt Elkins wrote:
>>     //handles ~= RH(3); // Fails because post-blit constructor 
>> is @disabled
>
>  It really comes down to that an array qualifies as an Lvalue 
> operator; But I _think_ this is a bug in the language since you 
> should be able to assign a new Rvalue to a new array element 
> just being created/added. We'll have to get input from Walter 
> or Andrei.

Alright here's a minimalistic test of the problem. Probably end 
up adding this to bugzilla.

struct S {
   @disable this(this);
}

unittest {
  // S s = S(); //normal assign, not important
  S a[];
  a ~= S();  //doesn't assign, postblit disabled
}


More information about the Digitalmars-d mailing list