mirror of
https://github.com/dlang/phobos.git
synced 2025-05-14 08:55:54 +03:00
Slightly tone down warning message about value-type RNGs and Random{Cover, Sample}.
This commit is contained in:
parent
98a3efb621
commit
3bdda604a8
1 changed files with 3 additions and 3 deletions
|
@ -1590,7 +1590,7 @@ foreach (e; randomCover(a, Random(unpredictableSeed))) // correct!
|
||||||
writeln(e);
|
writeln(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (e; randomCover(a, rndGen)) // WRONG!! rndGen gets copied by value
|
foreach (e; randomCover(a, rndGen)) // DANGEROUS!! rndGen gets copied by value
|
||||||
{
|
{
|
||||||
writeln(e);
|
writeln(e);
|
||||||
}
|
}
|
||||||
|
@ -1808,8 +1808,8 @@ foreach (e; randomSample(a, 5, Random(unpredictableSeed))) // correct!
|
||||||
writeln(e);
|
writeln(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (e; randomSample(a, 5, rndGen)) // WRONG!! rndGen gets copied
|
foreach (e; randomSample(a, 5, rndGen)) // DANGEROUS!! rndGen gets
|
||||||
{ // by value
|
{ // copied by value
|
||||||
writeln(e);
|
writeln(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue