How do you append to a dynamic array using move semantics?

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 23 16:44:55 PDT 2016


On 24.03.2016 00:26, cy wrote:
> ++items.length
> move(items[$-1],item); // Error: struct Thing is not copyable because it
> is annotated with @disable

You got the order of arguments wrong here. Source goes first, target 
second. Works for me with `move(item, items[$-1]);`.


More information about the Digitalmars-d-learn mailing list