Priority queue constructors [C++ Reference]
Keywords: stl,priority_queue,pqueue_constructors
Date: 2009-10-09T08:01:16-0700

[[Priority queue constructors]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## Priority queue constructors

Syntax:

        #include <queue>
        explicit priority_queue( const Compare& cmp = Compare(),
                                 const Container& c = Container() );

        priority_queue( input_iterator start,
                        input_iterator end,
                        const Compare& comp = Compare(),
                        const Container& c = Container() );

Priority queues can be constructed with an optional compare function `cmp` and an optional container `c`. If `start` and `end` are specified, the priority queue will be constructed with the elements between `start` and `end`.

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •