Skip to content

Commit

Permalink
fix Issue 6217 - [GSOC] result of std.algorithm.map is not movable
Browse files Browse the repository at this point in the history
It's so simple, and it's been ages as it was broken.
  • Loading branch information
DmitryOlshansky committed Mar 23, 2012
1 parent abe9cb5 commit 71b1c1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion std/algorithm.d
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ unittest
/// Ditto
T move(T)(ref T src)
{
T result;
T result=void;
move(src, result);
return result;
}
Expand Down Expand Up @@ -8724,3 +8724,9 @@ unittest
//writeln(b[0]);
assert(b[0] == tuple(4.0, 2u));
}

unittest//Issue 6217
{
auto x = map!"a"([1,2,3]);
x = move(x);
}

0 comments on commit 71b1c1a

Please sign in to comment.