std::queue (3) - Linux Manuals
std::queue: std::queue
NAME
Synopsis
Defined in header <queue>
template<
class T,
class Container = std::deque<T>
> class queue;
The std::queue class is a container adapter that gives the programmer the functionality of a queue - specifically, a FIFO (first-in, first-out) data structure.
The class template acts as a wrapper to the underlying container - only a specific set of functions is provided. The queue pushes the elements on the back of the underlying container and pops them from the front.
Template parameters
T - The behavior is undefined if T is not the same type as Container::value_type.
Container - * front()
Member types
Member type Definition
container_type Container
value_type Container::value_type
size_type Container::size_type
reference Container::reference
const_reference Container::const_reference
Member functions
constructor (public member function)
destructor (public member function)
operator= (public member function)
Element access
front (public member function)
back (public member function)
Capacity
empty (public member function)
size (public member function)
Modifiers
push (public member function)
emplace constructs element in-place at the end
(C++11)
pop (public member function)
swap (public member function)
Member objects
Container c (protected member object)
Non-member functions
operator==
operator!= lexicographically compares the values in the queue
operator< (function template)
operator<=
operator>
operator>=