Skip to content

Commit bdf6907

Browse files
committed
'passed by copy, not by ref'
1 parent 74c2bee commit bdf6907

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

std/range/package.d

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3883,8 +3883,7 @@ pure @safe nothrow @nogc unittest
38833883
/++
38843884
`drop` is a convenience function which calls
38853885
$(REF popFrontN, std, range, primitives)`(range, n)` and returns `range`.
3886-
Unlike `popFrontN`, the range argument is not passed by `ref`, so
3887-
the source range may not get popped.
3886+
Unlike `popFrontN`, the range argument is passed by copy, not by `ref`.
38883887
38893888
`drop` makes it easier to pop elements from a range rvalue
38903889
and then pass it to another function within a single expression,
@@ -4038,8 +4037,7 @@ if (isBidirectionalRange!R)
40384037
/++
40394038
`dropOne` is a convenience function which calls
40404039
`range.popFront()` and returns `range`.
4041-
Unlike `popFront`, the range argument is not passed by `ref`, so
4042-
the source range may not get popped.
4040+
Unlike `popFront`, the range argument is passed by copy, not by `ref`.
40434041
40444042
`dropOne` makes it easier to pop an element from a range rvalue
40454043
and then pass it to another function within a single expression,

0 commit comments

Comments
 (0)