This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/82584] div by zero in random distribution


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82584

--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
The make_unique bit's irrelevant:
 std::discrete_distribution<int32_t> X (weights.begin(), weights.end());
is sufficient.

Reading 29.6.8.6.1 suggests the code is well formed, but all (two) probabilites
are zero

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]