www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19168] New: std.random.randomCover and randomSample should

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 puremagic.com
          Reporter: n8sh.secondary 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.

--
Aug 14 2018