Skip to content

Commit

Permalink
Change opOpAssign to use auto ref to prevent copying static arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
schveiguy authored Jun 26, 2017
1 parent 879f0b9 commit 4de14ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/container/array.d
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ if (!is(Unqual!T == bool))
/**
* Forwards to `insertBack`.
*/
void opOpAssign(string op, Stuff)(Stuff stuff)
void opOpAssign(string op, Stuff)(auto ref Stuff stuff)
if (op == "~")
{
static if (is(typeof(stuff[])) && isImplicitlyConvertible!(typeof(stuff[0]), T))
Expand Down

0 comments on commit 4de14ab

Please sign in to comment.