libstdc++: Replace implicit lambda capture of 'this' [PR116964]
commitf135278f559914c0336cd8ad0af0deac2a0c86fd
authorJonathan Wakely <jwakely@redhat.com>
Fri, 4 Oct 2024 09:44:46 +0000 (4 10:44 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 4 Oct 2024 09:53:23 +0000 (4 10:53 +0100)
tree0e8ad06e724f362c4e54a9943724bec35cac28f7
parenta96ebb2cd4de205c6d4ac6691117e4e96f8533e9
libstdc++: Replace implicit lambda capture of 'this' [PR116964]

C++20 deprecates implicit capture of 'this', so change [=] to [this] for
all lambda expressions in <shared_mutex>. This only shows up on targets
where _GLIBCXX_USE_PTHREAD_RWLOCK_T is not defined, as we have an
alternative implementation of shared mutexes in that case.

libstdc++-v3/ChangeLog:

PR libstdc++/116964
* include/std/shared_mutex (__shared_mutex_cv): Use [this] for
lambda captures.
(shared_timed_mutex) [!_GLIBCXX_USE_PTHREAD_RWLOCK_T]: Likewise.
libstdc++-v3/include/std/shared_mutex