This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/68519] condition_variable::wait_for does not work properly with float duration


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]