Namespaces
Variants
Views
Actions

std::queue::swap

From cppreference.com
< cpp‎ | container‎ | queue
Revision as of 12:19, 2 November 2012 by P12bot (Talk | contribs)

void swap( queue& other );

Exchanges the contents of the container adaptor with those of other. Effectively calls using std::swap; swap(c, other.c);

Contents

Parameters

other - container adaptor to exchange the contents with

Return value

(none)

Exceptions

(none)

(until C++11)
noexcept specification:  
noexcept(noexcept(std::swap(c, other.c)))
(since C++11)

Complexity

Same as underlying container (linear if Container is std::array, constant otherwise).

See also

specializes the std::swap algorithm
(function template) [edit]