std.random.uniform!T(urng) when T is dchar disregards urng and always uses a thread-local random Demonstration: --- void main() { // The following loop is unlikely to complete without an assertion failure: foreach (_; 0 .. 100) { import std.random : uniform, Xorshift32; auto rng0 = Xorshift32(123456789); auto rng1 = Xorshift32(123456789); assert(uniform!dchar(rng0) == uniform!dchar(rng1)); } } ---
@n8sh created dlang/phobos pull request #7695 "Fix problems with std.random.uniform!dchar(urng)" fixing this issue: - Fix Issue 21383 - std.random.uniform!T(urng) when T is dchar disregards urng and always uses a thread-local random https://github.com/dlang/phobos/pull/7695
dlang/phobos pull request #7695 "Fix problems with std.random.uniform!dchar(urng)" was merged into stable: - f5c9556e484f04f386cb6f1db3e337312b89eb81 by Nathan Sashihara: Fix Issue 21383 - std.random.uniform!T(urng) when T is dchar disregards urng and always uses a thread-local random https://github.com/dlang/phobos/pull/7695