std::copyable_function:: swap
From cppreference.net
<
cpp
|
utility
|
functional
|
copyable function
C++
Utilities library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Function objects
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Old binders and adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
void
swap
(
copyable_function
&
other
)
noexcept
;
|
(depuis C++26) | |
Échange les objets appelables stockés de
*
this
et
other
.
Paramètres
| other | - | fonction wrapper pour échanger l'objet appelable stocké avec |
Valeur de retour
(aucun)
Voir aussi
|
échange le contenu
(fonction membre publique de
std::function<R(Args...)>
)
|
|
échange les cibles de deux objets
std::move_only_function
(fonction membre publique de
std::move_only_function
)
|