This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/53841] [C++11] condition_variable::wait_until() fails with high resolution clocks
- 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: Wed, 14 Nov 2012 23:14:22 +0000
- Subject: [Bug libstdc++/53841] [C++11] condition_variable::wait_until() fails with high resolution clocks
- Auto-submitted: auto-generated
- References: <bug-53841-4@http.gcc.gnu.org/bugzilla/>
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.