◐ Shell
clean mode source ↗

std::vector::swap — cppreference.com

Материал из cppreference.com

<metanoindex/>

<tbody> </tbody>

void swap( vector& other );

Exchanges the contents of the container with those of other. All iterators and references remain valid.

The behavior is undefined if get_allocator() != other.get_allocator() and std::allocator_traits<allocator_type>::propagate_on_container_swap::value != true.

Параметры

other

Контейнер для обмена содержимым с

Оригинал:

container to exchange the contents with

Текст был переведён автоматически используя Переводчик Google.
Вы можете проверить и исправить перевод. Для инструкций щёлкните сюда.

Возвращаемое значение

(Нет)

Исключения

Сложность

Constant

См. также