Spec-Zone.ru › C++

std::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).

Parameters

lhs, rhs - polymorphic objects whose states to swap

Example

See also

swap
exchanges the contents
(public member function)

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/memory/polymorphic/swap2

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API