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 #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Dec 14 20:41:52 2017
New Revision: 255665

URL: https://gcc.gnu.org/viewcvs?rev=255665&root=gcc&view=rev
Log:
PR libstdc++/68519 use native duration to avoid rounding errors

        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:
    trunk/libstdc++-v3/testsuite/30_threads/condition_variable/members/68519.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/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]