std::shared_lock<Mutex>:: operator=
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
shared_lock::operator=
|
||||
| Shared locking | ||||
| Modifiers | ||||
| Observers | ||||
| Non-member functions | ||||
|
shared_lock
&
operator
=
(
shared_lock
&&
other
)
noexcept
;
|
(depuis C++14) | |
Opérateur d'affectation par déplacement. Équivalent à shared_lock { std :: move ( other ) } . swap ( * this ) ; return * this ; .
Si other est le même objet que * this , il n'y a aucun effet.
Sinon, si avant cet appel * this a un mutex associé (( mutex() renvoie un pointeur non nul) et en a acquis la propriété ( owns() renvoie true ), le mutex est déverrouillé en appelant unlock_shared() . Après cet appel, other n'a plus de mutex associé.
Paramètres
| autre | - |
un autre
shared_lock
pour remplacer l'état
|
Valeur de retour
* this
Rapports de défauts
Les rapports de défauts modifiant le comportement suivants ont été appliqués rétroactivement aux normes C++ précédemment publiées.
| DR | Applicable à | Comportement publié | Comportement corrigé |
|---|---|---|---|
| LWG 4172 | C++14 |
l'auto-affectation par déplacement de
shared_lock
était incorrectement spécifiée
|
respecificée comme une opération nulle |