https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Jonathan Wakely changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #14 from GCC Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:125bab23ad75449333983c9389898c5b92b3aa0d
commit r15-3129-g125bab23ad75449333983c9389898c5b92b3aa0d
Author: Giovanni Bajo
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |15.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #13 from Jonathan Wakely ---
std::random_shuffle was removed from the C++ standard years ago, precisely
because it uses low quality randomness. So it's not a high priority to fix
something that is no longer even in the standard, becau
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Andrea Griffini changed:
What|Removed |Added
CC||agriff at tin dot it
--- Comment #12 f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #11 from Jonathan Wakely ---
Yes, but in practice that's not the problem with mingw. The problem is the low
RAND_MAX. The distribution within the range of numbers produced is acceptable.
Good enough for std::random_shuffle anyway.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #10 from Xi Ruoyao ---
(In reply to Jonathan Wakely from comment #9)
> (In reply to Xi Ruoyao from comment #7)
> > The C++11 standard explicitly allows to use rand() as the random source for
> > random_shuffle, thus this is not a bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Jonathan Wakely changed:
What|Removed |Added
Severity|enhancement |normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #9 from Jonathan Wakely ---
(In reply to Xi Ruoyao from comment #7)
> The C++11 standard explicitly allows to use rand() as the random source for
> random_shuffle, thus this is not a bug but an enhancement.
It doesn't just allow it,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #8 from Xi Ruoyao ---
(In reply to Xi Ruoyao from comment #7)
> The C++11 standard explicitly allows to use rand() as the random source for
> random_shuffle, thus this is not a bug but an enhancement.
>
> As random_shuffle is depreca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Xi Ruoyao changed:
What|Removed |Added
Severity|normal |enhancement
CC|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #6 from Giovanni Bajo ---
A patch has been posted here:
https://gcc.gnu.org/ml/libstdc++/2018-12/msg00038.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #5 from Giovanni Bajo ---
Created attachment 45474
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45474&action=edit
Chart generated by chart.cpp that highlights broken distribution
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #4 from Giovanni Bajo ---
Created attachment 45473
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45473&action=edit
What test.cpp actually does output with std::random_shuffle
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #3 from Giovanni Bajo ---
Created attachment 45472
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45472&action=edit
What test.cpp should output if random_shuffle worked
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #2 from Giovanni Bajo ---
Created attachment 45471
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45471&action=edit
Test code to draw a chart of distributions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88935
--- Comment #1 from Giovanni Bajo ---
Created attachment 45470
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45470&action=edit
Test code to reproduce bug
18 matches
Mail list logo