20 Memory management library [mem]

20.4 Types for composite class design [mem.composite.types]

20.4.2 Class template polymorphic [polymorphic]

20.4.2.7 Swap [polymorphic.swap]

constexpr void swap(polymorphic& other) noexcept(allocator_traits<Allocator>::propagate_on_container_swap::value || allocator_traits<Allocator>::is_always_equal::value);
Preconditions: If allocator_traits<Allocator>​::​propagate_on_container_swap​::​value is true, then Allocator meets the Cpp17Swappable requirements.
Otherwise get_allocator() == other.
get_allocator()
is true.
Effects: Swaps the states of *this and other, exchanging owned objects or valueless states.
If allocator_traits<Allocator>​::​propagate_on_container_swap​::​value is true, then the allocators of *this and other are exchanged by calling swap as described in [swappable.requirements].
Otherwise, the allocators are not swapped.
[Note 1: 
Does not call swap on the owned objects directly.
— end note]
constexpr void swap(polymorphic& lhs, polymorphic& rhs) noexcept(noexcept(lhs.swap(rhs)));
Effects: Equivalent to lhs.swap(rhs).