mirror of
https://github.com/dlang/phobos.git
synced 2025-05-14 00:45:09 +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);
|
||||
}
|
||||
|
||||
foreach (e; randomCover(a, rndGen)) // WRONG!! rndGen gets copied by value
|
||||
foreach (e; randomCover(a, rndGen)) // DANGEROUS!! rndGen gets copied by value
|
||||
{
|
||||
writeln(e);
|
||||
}
|
||||
|
@ -1808,8 +1808,8 @@ foreach (e; randomSample(a, 5, Random(unpredictableSeed))) // correct!
|
|||
writeln(e);
|
||||
}
|
||||
|
||||
foreach (e; randomSample(a, 5, rndGen)) // WRONG!! rndGen gets copied
|
||||
{ // by value
|
||||
foreach (e; randomSample(a, 5, rndGen)) // DANGEROUS!! rndGen gets
|
||||
{ // copied by value
|
||||
writeln(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue