]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix regression in std::random_device default constructor
authorJonathan Wakely <jwakely@redhat.com>
Tue, 16 Oct 2018 22:42:39 +0000 (23:42 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 16 Oct 2018 22:42:39 +0000 (23:42 +0100)
commitec2e0ad5ea14eba33a120ce38b2ae25b3c7b7996
treeccec25b0ccab9c0b05c1ebdab9fd536b2784805b
parent01982cfbe7e15384db6f9580bd9d05ea867b2adc
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.

From-SVN: r265218
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/random.h