Namespaces
Variants
Views
Actions

std::swap(std::priority_queue)

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

template< class T, class Container, class Compare >

void swap( priority_queue<T,Container,Compare>& lhs,

           priority_queue<T,Container,Compare>& rhs );

Specializes the std::swap algorithm for std::priority_queue. Swaps the contents of lhs and rhs. Calls lhs.swap(rhs).

Contents

Parameters

lhs, rhs - containers whose contents to swap

Return value

(none)

Complexity

Same as swapping the underlying container.

See also

swaps the contents
(public member function) [edit]