Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    f135278f
    libstdc++: Replace implicit lambda capture of 'this' [PR116964] · f135278f
    Jonathan Wakely authored
    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.
    f135278f
    History
    libstdc++: Replace implicit lambda capture of 'this' [PR116964]
    Jonathan Wakely authored
    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.