std::swap(std::polymorphic)
From cppreference.com
< cpp | memory | polymorphic
C++
Memory management library
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::polymorphic
| Member functions | ||||
| Observers | ||||
| Modifiers | ||||
| Non-member functions | ||||
swap(std::polymorphic) |
| Defined in header <memory>
|
||
| constexpr void swap( polymorphic& lhs, polymorphic& rhs ) noexcept(noexcept(lhs.swap(rhs)); |
(since C++26) | |
Overloads the std::swap algorithm for std::polymorphic. Exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs).
[edit] Parameters
| lhs, rhs | - | polymorphic objects whose states to swap
|
[edit] Example
| This section is incomplete Reason: no example |
[edit] See also
| exchanges the contents (public member function) [edit] |