STL - deque

构造函数
deque();
deque( size_type num, const TYPE &val );
deque( const deque &from );
deque( input_iterator start, input_iterator end );

运算符
[], =, ==, !=, >, >=, <, <=
两个deque相等:所有相同位置的元素相等
两个deque大小比较:按照词典规则

迭代器
iterator begin();
iterator end();
reverse_iterator rbegin();
reverse_iterator rend();

访问
TYPE at( size_type loc );
TYPE front();
TYPE back();

新增
void push_front( const TYPE &val );
void push_back( const TYPE &val );
iterator insert( iterator loc, const TYPE &val );
void insert( iterator loc, size_type num, const TYPE &val );
void insert( iterator loc, input_iterator start, input_iterator end );

移除
void pop_front();
void pop_back();
iterator erase( iterator loc );
iterator erase( iterator start, iterator end );
void clear();

交换方法
void swap( deque &from );

大小
bool empty();
size_type size();
void resize( size_type num, const TYPE& val = TYPE() );

posted @ 2013-05-08 21:24  Leung文  阅读(183)  评论(0编辑  收藏  举报