STL队列-FIFO
来源:互联网 发布:想做个网络作家 编辑:程序博客网 时间:2024/06/05 10:20
class template
<queue>
std::queue
template <class T, class Container = deque<T> > class queue;
FIFO queue
queues are a type of container adaptor, specifically designed to operate in a FIFO context (first-in first-out), where elements are inserted into one end of the container and extracted from the other.queues are implemented as containers adaptors, which are classes that use an encapsulated object of a specific container class as its underlying container, providing a specific set of member functions to access its elements. Elements are pushed into the "back" of the specific container and popped from its "front".
The underlying container may be one of the standard container class template or some other specifically designed container class. This underlying container shall support at least the following operations:
- front
- back
- push_back
- pop_front
The standard container classes deque and list fulfill these requirements. By default, if no container class is specified for a particular queue class instantiation, the standard container deque is used.
Template parameters
- T
- Type of the elements.
Aliased as member type queue::value_type. - Container
- Type of the internal underlying container object where the elements are stored.
Its value_type shall be T.
Aliased as member type queue::container_type.
Member types
- C++98
- C++11
value_type&
const_referencecontainer_type::const_referenceusually, const value_type&
size_typean unsigned integral typeusually, the same as size_tMember functions
- (constructor)
- Construct queue (public member function )
- empty
- Test whether container is empty (public member function )
- size
- Return size (public member function )
- front
- Access next element (public member function )
- back
- Access last element (public member function )
- push
- Insert element (public member function )
- emplace
- Construct and insert element (public member function )
- pop
- Remove next element (public member function )
- swap
- Swap contents (public member function )
Non-member function overloads
- relational operators
- Relational operators for queue (function )
- swap (queue)
- Exchange contents of queues (public member function )
Non-member class specializations
- uses_allocator<queue>
Uses allocator for queue (class template )
- STL队列-FIFO
- 【数据结构】【C++STL】FIFO队列&优先队列
- FIFO表,STL队列的代码
- 【数据结构】【C++STL】栈和FIFO队列
- 队列 FIFO
- java算法:FIFO队列
- 环形队列FIFO
- 数据结构----FIFO队列
- python实现队列 FIFO
- 队列( FIFO ) 循环队列
- FIFO队列和优先队列
- 内核循环队列实现fifo
- 先进先出队列 FIFO
- 环形队列FIFO实现方法
- 队列的实现(FIFO、链表)
- ZooKeeper实现分布式FIFO队列
- ZooKeeper实现分布式FIFO队列
- ZooKeeper实现分布式FIFO队列
- 首都机场的记忆
- ie6问题
- 数据挖掘优化
- 字符串语句逆向输出
- DWZ (JUI) 教程 表单提交重定向问题
- STL队列-FIFO
- Ubuntu 12.04 MySQL安装指南
- WIN8 64位+ tomcat6.0 64位+jdk6.0 64位下tomcat启动报错
- 监控GreenPlum Segment磁盘空间
- 停车场管理系统(三)
- 【python】写xml节点相关知识
- 停车场管理系统(四)
- 停车场管理系统(五)
- 不使用跳转的宏CV_IMIN分析