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
;
|
(C++26부터) | |
저장된 호출 가능 객체를
*
this
와
other
사이에서 교환합니다.
매개변수
| other | - | 저장된 호출 가능 객체를 교환하기 위한 함수 래퍼 |
반환값
(없음)
참고 항목
|
내용을 교환합니다
(
std::function<R(Args...)>
의 public 멤버 함수)
|
|
두 개의
std::move_only_function
객체의 대상을 교환합니다
(
std::move_only_function
의 public 멤버 함수)
|