On Wednesday, 16 April 2014 at 16:21:42 UTC, Adam D. Ruppe wrote:
What's the definition of InputRange? Is it the interface from
std.range?
If so, don't pass it as ref. interfaces are references to the
object by default.
In general, you only need ref when you want to assign a new
object to the variable and want that change to be seen outside
the function too.
InputRange is an array of structs. this is also a struct, a range
that manipulates elements in the InputRange (i.e. it calculates
values and stores them in fields of each struct that is in the
array).