[Issue 19168] New: std.random.randomCover and randomSample should warn that struct RNGs are copied (original is not updated)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 14 11:03:07 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19168
Issue ID: 19168
Summary: std.random.randomCover and randomSample should warn
that struct RNGs are copied (original is not updated)
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: n8sh.secondary at hotmail.com
The behavior is described in https://issues.dlang.org/show_bug.cgi?id=7067.
Since the `rng` parameter is `auto ref` this behavior is not obvious merely
from the function signature, so at the very least this quirk should be
mentioned in the documentation.
--
More information about the Digitalmars-d-bugs
mailing list