https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122683
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a false positive.
_M_owns says if the current unique_lock object has the lock on the mutex. So it
does not neeed to protected as it is not a shared object between threads nor
shared under the mutex that is being locked.