[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
Mon Jul 21 08:59:07 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:
A program-defined rep type can observe a copy, but it can't tell whether it happens when initializing the function argument or inside the function.
https://github.com/llvm/llvm-project/pull/148330
More information about the libcxx-commits
mailing list