swap method

void swap(
  1. Queue<T> other
)

Exchanges the contents of this queue with those of other.

Implementation

void swap(Queue<T> other) {
  _container.swap(other._container);
}