Namespaces
Variants

std:: swap (std::polymorphic)

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
헤더에 정의됨 <memory>
constexpr void swap ( polymorphic & lhs, polymorphic & rhs )
noexcept ( noexcept ( lhs. swap ( rhs ) ) ) ;
(C++26부터)

std::swap 알고리즘을 std::polymorphic 에 대해 오버로드합니다. lhs 의 상태와 rhs 의 상태를 교환합니다. 효과적으로 lhs. swap ( rhs ) 를 호출합니다.

매개변수

lhs, rhs - polymorphic 상태를 교환할 객체들

예제

참고 항목

내용을 교환합니다
(public member function)