std::priority_queue::top

const_reference top() const; Returns reference to the top element in the priority queue. This element will be removed on a call to pop(). If default comparison function is used, the returned element is also the greatest among the elements in the queue. Parameters (none). Return value Reference to the top element as if obtained by a call to c.front(). Complexity Constant. See also pop removes the top element (public member function)

std::priority_queue::swap

void swap( priority_queue& other ); (since C++11) Exchanges the contents of the container adaptor with those of other. Effectively calls using std::swap; swap(c, other.c); swap(comp, other.comp); Parameters other - container adaptor to exchange the contents with Return value (none). Exceptions noexcept specification: noexcept(noexcept(std::swap(c, other.c)) && noexcept(std::swap(comp, other.comp))) Complexity Same as underlying container (typically cons

std::promise::get_future

std::future<T> get_future(); (since C++11) Returns a future object associated with the same shared state as *this. Exception is thrown if *this has no shared state or get_future has already been called. To get multiple "pop" ends of the promise-future communication channel, use std::future::share. Parameters (none). Return value A future referring to the shared state of *this. Exceptions std::future_error on the following conditions: *this has no shared state. The error

std::proj(std::complex)

Defined in header <complex> template< class T > complex<T> proj( const complex<T>& z ); (1) (since C++11) std::complex<long double> proj( long double z ); (2) (since C++11) template< class DoubleOrIngeter > std::complex<double> proj( DoubleOrInteger z ); (3) (since C++11) std::complex<float> proj( float z ); (4) (since C++11) Returns the projection of the complex number z onto the Riemann sphere. For most z, s

std::priority_queue::push

void push( const T& value ); void push( T&& value ); (since C++11) Pushes the given element value to the priority queue. 1) Effectively calls c.push_back(value); std::push_heap(c.begin(), c.end(), comp); 2) Effectively calls c.push_back(std::move(value)); std::push_heap(c.begin(), c.end(), comp); Parameters value - the value of the element to push Return value (none). Complexity Logarithmic number of comparisons plus the complexity of Container::pu

std::priority_queue::pop

void pop(); Removes the top element from the priority queue. Effectively calls std::pop_heap(c.begin(), c.end(), comp); c.pop_back(); Parameters (none). Return value (none). Complexity Logarithmic number of comparisons plus the complexity of Container::pop_back. See also emplace (C++11) constructs element in-place and sorts the underlying container (public member function) push inserts element and sorts the underlying container (public member function) top ac

std::priority_queue::priority_queue

(1) explicit priority_queue( const Compare& compare = Compare(), const Container& cont = Container() ); (until C++11) priority_queue( const Compare& compare, const Container& cont ); (since C++11) explicit priority_queue( const Compare& compare = Compare(), Container&& cont = Container() ); (2) (since C++11) priority_queue( const priority_queue& other ); (3) priority_queue( priority_queue&

std::priority_queue::size

size_type size() const; Returns the number of elements in the underlying container, that is, c.size(). Parameters (none). Return value The number of elements in the container. Complexity Constant. See also empty checks whether the underlying container is empty (public member function)

std::priority_queue::empty

bool empty() const; Checks if the underlying container has no elements, i.e. whether c.empty(). Parameters (none). Return value true if the underlying container is empty, false otherwise. Complexity Constant. See also size returns the number of elements (public member function)

std::priority_queue

Defined in header <queue> template< class T, class Container = std::vector<T>, class Compare = std::less<typename Container::value_type> > class priority_queue; A priority queue is a container adaptor that provides constant time lookup of the largest (by default) element, at the expense of logarithmic insertion and extraction. A user-provided Compare can be supplied to change the ordering, e.g. using std::greater<T> would cause the smalle