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++/53841] [C++11] condition_variable::wait_until() fails with high resolution clocks


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53841

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-11-14
     Ever Confirmed|0                           |1

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-14 23:14:22 UTC ---
(In reply to comment #3)
> -    const chrono::nanoseconds __delta = __atime - __c_entry;
> -    const __clock_t::time_point __s_atime = __s_entry + __delta;
> +    const auto __delta = __atime - __c_entry;
> +    const auto __s_atime = __s_entry + __delta;

Thanks for this.

> Clang trunk currently rejects this code (prior to instantiation, even) due to
> this invalid conversion if _GLIBCXX_USE_CLOCK_REALTIME is not defined (as seems
> to be the case on several popular linux distributions).

That's not defined on GNU/Linux unless you build GCC with
--enable-libstdcxx-time=rt, which has performance implications.


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