From 360c094a0725bb0cc444115c0377db10e5e9ae1f Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Fri, 5 Nov 2021 14:30:24 -0700 Subject: [PATCH] libstdc++: Make atomic::wait() const [PR102994] This was an oversight in the original commit adding wait/notify to atomic. libstdc++-v3/ChangeLog: PR libstdc++/102994 * include/bits/atomic_base.h (__atomic_base<_PTp*>::wait()) add const qualifier. --- libstdc++-v3/include/bits/atomic_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/atomic_base.h b/libstdc++-v3/include/bits/atomic_base.h index 9e18aadadaf..a104adc1a10 100644 --- a/libstdc++-v3/include/bits/atomic_base.h +++ b/libstdc++-v3/include/bits/atomic_base.h @@ -893,7 +893,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cpp_lib_atomic_wait _GLIBCXX_ALWAYS_INLINE void wait(__pointer_type __old, - memory_order __m = memory_order_seq_cst) noexcept + memory_order __m = memory_order_seq_cst) const noexcept { std::__atomic_wait_address_v(&_M_p, __old, [__m, this] -- 2.31.1