Skip to content

Commit

Permalink
documentation: fix requirements of remove
Browse files Browse the repository at this point in the history
All overloads require a bidirectional range with lvalue elements.
  • Loading branch information
aG0aep6G committed Apr 30, 2016
1 parent f6f61f9 commit f46e52b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion std/algorithm/mutation.d
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,8 @@ 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
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
Expand Down

0 comments on commit f46e52b

Please sign in to comment.