[libcxx-commits] [libcxx] [libc++] Save duration/timeout locally for condition_variable waits (PR #148330)
Jonathan Wakely via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jul 27 09:07:03 PDT 2025
================
@@ -188,9 +188,10 @@ public:
_LIBCPP_HIDE_FROM_ABI cv_status wait_until(_Lock& __lock, const chrono::time_point<_Clock, _Duration>& __t) {
shared_ptr<mutex> __mut = __mut_;
unique_lock<mutex> __lk(*__mut);
+ const chrono::time_point<_Clock, _Duration> __t_local = __t;
----------------
jwakely wrote:
It also depends on the rule about addressable functions, so that users can't rely on the type of function pointer if they take its address
https://github.com/llvm/llvm-project/pull/148330
More information about the libcxx-commits
mailing list