[Bug libstdc++/105502] [9/10/11/12/13 Regression] std::normal_distribution deserialization issue
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 6 22:55:34 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105502
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:909ef4e2727ddc50a32d6ad379a1f1ccc1043c6a
commit r13-163-g909ef4e2727ddc50a32d6ad379a1f1ccc1043c6a
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri May 6 21:19:17 2022 +0100
libstdc++: Fix deserialization for std::normal_distribution [PR105502]
This fixes a regression in std::normal_distribution deserialization that
caused the object to be left unchanged if the __state_avail value read
from the stream was false.
libstdc++-v3/ChangeLog:
PR libstdc++/105502
* include/bits/random.tcc
(operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
Update state when __state_avail is false.
*
testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
Check that deserialized object equals serialized one.
More information about the Gcc-bugs
mailing list