This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/82584] div by zero in random distribution
- From: "nathan at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Oct 2017 16:54:48 +0000
- Subject: [Bug libstdc++/82584] div by zero in random distribution
- Auto-submitted: auto-generated
- References: <bug-82584-4@http.gcc.gnu.org/bugzilla/>
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