|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
constexprvoid swap( polymorphic& other)noexcept(/* see below */); | (since C++26) | |
Swaps the contents with those ofother.
In the description below,swap_allocators refers tostd::allocator_traits<Allocator>::propagate_on_container_swap::value.
Swaps the states of*this andother, exchanging owned objects or valueless states.
alloc , other.alloc );.If one of the following conditions is satisfied, the behavior is undefined:
Allocator does not satisfy the requirements ofSwappable.Contents |
| other | - | thepolymorphic object to exchange the contents with |
| This section is incomplete Reason: no example |
(C++26) | specializes thestd::swap algorithm (function template)[edit] |