This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/68519] condition_variable::wait_for does not work properly with float duration
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Aug 2018 22:51:12 +0000
- Subject: [Bug libstdc++/68519] condition_variable::wait_for does not work properly with float duration
- Auto-submitted: auto-generated
- References: <bug-68519-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68519
--- Comment #10 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Tue Aug 7 22:50:40 2018
New Revision: 263380
URL: https://gcc.gnu.org/viewcvs?rev=263380&root=gcc&view=rev
Log:
PR libstdc++/68519 use native duration to avoid rounding errors
Backport from mainline
2017-12-14 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/68519
* include/std/condition_variable (condition_variable::wait_for):
Convert duration to native clock's duration before addition.
* testsuite/30_threads/condition_variable/members/68519.cc: New test.
Added:
branches/gcc-7-branch/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
Modified:
branches/gcc-7-branch/libstdc++-v3/ChangeLog
branches/gcc-7-branch/libstdc++-v3/include/std/condition_variable