Fix regression in std::random_device default constructor
commit4c4d9641c447e5dfc45ae7088b0534522be9aa9c
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Oct 2018 22:42:39 +0000 (16 22:42 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 16 Oct 2018 22:42:39 +0000 (16 22:42 +0000)
treeccec25b0ccab9c0b05c1ebdab9fd536b2784805b
parentcc346f1ef52a41c452c04b22a76cf2a430b4cc8e
Fix regression in std::random_device default constructor

When the default constructor was split out into a separate function (in
r261522) I accidentally  made it call _M_init("mt19937") instead of
_M_init_pretr1("mt19937"). That means it will always throw an exception,
because "mt19937" isn't a valid token accepted by the _M_init function.
Restore the original behaviour by calling _M_init_pretr1("mt19937").

* include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
Fix default constructor to call correct function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@265218 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h