Queue#
Source file#
Interface#
-
template<ContainerElement T, SequenceContainer Container = Deque<T>>
class Queue# a LIFO (last-in, first-out) data structure.
Any sequence container supporting operations
back(),push_back()andpop_back()can be used to instantiate queue. In particular, list and deque can be used.Difference
Allocatoris not required as container’s template parameter.- 模板参数
T – Type of element. Required to be a complete type.
Container – Type of the underlying container to use to store the elements.
Public Types
Public Functions
-
inline constexpr Queue() noexcept#
-
~Queue() = default#
-
inline constexpr bool empty() const noexcept#
-
inline constexpr const_reference front() const noexcept#
-
inline constexpr const_reference back() const noexcept#
-
inline constexpr void push(const value_type &x) noexcept#
-
inline constexpr void push(value_type &&x) noexcept#
-
inline constexpr void pop()#