Ranges and random numbers -- again

monarch_dodra monarchdodra at gmail.com
Tue Jun 18 07:50:07 PDT 2013


On Tuesday, 18 June 2013 at 14:18:19 UTC, H. S. Teoh wrote:
> [...]
>
> Just make RNGs passed by reference, and the above problem will 
> not
> happen.
>
>
> T

Well... it's more than *just* pass-by-reference, its actual 
store-by-reference (eg "reference semantic").

In the case of "take", take store a copy of the passed range, so 
a pass-by-reference wouldn't really change much.

I'm not sure if that's what you meant, but just in case. We don't 
want any ambiguity on the words we are using.


More information about the Digitalmars-d mailing list