Skip to content

Commit

Permalink
Merge pull request #4271 from aG0aep6G/remove-requirements
Browse files Browse the repository at this point in the history
documentation: fix requirements of remove
  • Loading branch information
DmitryOlshansky committed May 1, 2016
2 parents cfe0070 + 4a28601 commit 13025ab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions std/algorithm/mutation.d
Original file line number Diff line number Diff line change
Expand Up @@ -1563,11 +1563,11 @@ of the stability requirement, $(D remove) moved elements from the end
of the array over the slots to be removed. This way there is less data
movement to be done which improves the execution time of the function.
The function $(D remove) works on any forward range. The moving
strategy is (listed from fastest to slowest): $(UL $(LI If $(D s ==
SwapStrategy.unstable && isRandomAccessRange!Range && hasLength!Range
&& hasLvalueElements!Range), then elements are moved from the end
of the range into the slots to be filled. In this case, the absolute
The function $(D remove) works on bidirectional ranges that have assignable
lvalue elements. The moving strategy is (listed from fastest to slowest):
$(UL $(LI If $(D s == SwapStrategy.unstable && isRandomAccessRange!Range &&
hasLength!Range && hasLvalueElements!Range), then elements are moved from the
end of the range into the slots to be filled. In this case, the absolute
minimum of moves is performed.) $(LI Otherwise, if $(D s ==
SwapStrategy.unstable && isBidirectionalRange!Range && hasLength!Range
&& hasLvalueElements!Range), then elements are still moved from the
Expand Down

0 comments on commit 13025ab

Please sign in to comment.