Thread overview | ||||||
---|---|---|---|---|---|---|
|
June 02, 2014 [Issue 12835] std.random.uniform with open lower bound cannot support smaller integral types or character types | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12835 --- Comment #2 from Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> --- Fix submitted: https://github.com/D-Programming-Language/phobos/pull/2221 -- |
June 02, 2014 [Issue 12835] std.random.uniform with open lower bound cannot support smaller integral types or character types | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12835 --- Comment #1 from Joseph Rushton Wakeling <joseph.wakeling@webdrake.net> --- If we look at the problematic line in the _old_ std.random (i.e. before PR 1717 was merged), we have the following: ResultType min = cast(ResultType) a + 1; I'm presuming that this is probably simply a typo and that line should read, ResultType min = cast(ResultType) (a + 1); .... ? -- |
July 11, 2014 [Issue 12835] std.random.uniform with open lower bound cannot support smaller integral types or character types | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12835 --- Comment #3 from github-bugzilla@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/88d86ecda0c53568e4c7036ec85aa7a5a27438f9 Fix Issue #12835: open lower bound for integral-type uniform() Added a cast to ensure the setting of lower bound can handle character types and integral types smaller than int. The additional unittests should prevent such issues from arising again. https://github.com/D-Programming-Language/phobos/commit/9e96ee3d38b563fb70c8761a0ccee663d59810cc Merge pull request #2221 from WebDrake/uniform-lowerbound Fix Issue #12835: open lower bound for integral-type uniform() -- |
July 11, 2014 [Issue 12835] std.random.uniform with open lower bound cannot support smaller integral types or character types | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12835 github-bugzilla@puremagic.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- |
Copyright © 1999-2021 by the D Language Foundation