[Issue 19168] 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
Wed Aug 15 13:22:08 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19168

Seb <greensunny12 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12 at gmail.com

--- Comment #1 from Seb <greensunny12 at gmail.com> ---
Better ways:

- split in two overloads and deprecate the by value one
- fix random ranges in general by making them non-copyable (like suggested in
#7067)

However, the latter is a lot of work and it might be easier to just submit a
version of mir.random as std.experimental.random and to fully replace
std.random (there has been some talk about doing this, but it never
materialized.)

--


More information about the Digitalmars-d-bugs mailing list