Standard C++ Library Class Reference

Description
The queue container adaptor lets a container function as a queue. In a queue, items are pushed
into the back of the container and removed from the front. The first items pushed into the queue
are the first items to be popped off of the queue (first in, first out, or "FIFO").
queue can adapt any container that supports the front(), back(), push_back() and pop_front()
operations. In particular, deque, list, and vector can be used.
Interface
template <class T, class Container = deque<T>,
class Allocator = allocator>
class queue {
public:
// typedefs
typedef typename Container::value_type value_type;
typedef typename Container::size_type size_type;
typedef Allocator allocator_type;
// Construct/Copy/Destroy
explicit queue (const Allocator& = Allocator());
allocator_type get_allocator () const;
// Accessors
bool empty () const;
size_type size () const;
value_type& front ();
const value_type& front () const;
value_type& back ();
const value_type& back () const;
void push (const value_type&);
void pop ();
};
// Non-member Operators
template <class T, class Container, class Allocator>
bool operator== (const queue<T, Container, Allocator>&,
const queue<T, Container, Allocator>&);
template <class T, class Container, class Allocator>
bool operator< (const queue<T, Container, Allocator>&,
const queue<T, Container, Allocator>&);
Constructors
explicit queue (const Allocator& alloc= Allocator());
Creates a queue of zero elements. The queue will use the allocator alloc for all storage