forward_list(c++11): 内部是一个单链表的实现;但是为了效率的考虑,故意没有 size 这个内置函数。

Constructor

六种构造方式default; fill; range; copy; move; initializer list;

Iterators

before_begin: return  iterator to before beginning; 可以作为插入的位置(在第一个元素之前插入,效果类似:push_front)

begin:

end:

cbefore_begin:

cbegin:

cend:

Capacity

empty:

max_size:

Element access

front:

Modifiers

assign:

emplace_front:

emplace_after:

push_front:

pop_front:

insert_after: 没有insert,只有insert_after;可以借助 before_begin 把元素插到第一个位置。返回值是最后一个新插入元素的迭代器。

erase_after: 范围擦除 (position,last),既不包含左值(因为是erase_after,不是erase),也不包含右值。

swap:

resize:

clear:

Operations

splice_after: Transfers elements from fwdlst into the container inserting them after the element pointed by position

remove: Remove elements with specific value。

remove_if:

unique:

merge:

sort:

reverse:

STL::forward_list的更多相关文章

  1. STL之序列式容器list与forward_list

    List (双向链表) 与 forwardlist (单向链表) 算是非常基础的数据结构了,这里只是简单介绍下其结构及应用. 以list为例: 其节点模板: template <class T& ...

  2. STL库之单链表:forward_list

    class template forward_list <forward_list> template < class T, class Alloc = allocator<T ...

  3. STL容器-- forward_list 用法

    http://www.cplusplus.com/reference/forward_list/

  4. STL标准库-容器-forward_list

    技术在于交流.沟通,本文为博主原创文章转载请注明出处并保持作品的完整性. forward_list即单向list,功能少额外开销就小.而且只能在前段插入元素 结构如下 一 定义 #include &l ...

  5. [c++] STL = Standard Template Library

    How many people give up, because of YOU. Continue... 先实践,最后需要总结. 1. 数据流中的数据按照一定的格式<T>提取 ------ ...

  6. 1.1 STL 概述

    综述   STL = Standard Template Library,标准模板库,惠普实验室开发的一系列软件的统称.它是由Alexander Stepanov.Meng Lee和David R M ...

  7. C++ STL 迭代器失效问题

    之前看<C++ Primier>的时候,也解到在顺序型窗口里insert/erase会涉及到迭代器失效的问题,并没有深究.今天写程序的时候遇到了这个问题. 1 莫名其妙的Erase 最初我 ...

  8. STL Iterators

    Summary of Chapter 33 STL Iterators from The C++ Programming Language 4th. Ed., Bjarne Stroustrup. - ...

  9. STL概述

    一.关于STL STL(Standard Template Library,标准模板库)是C++语言标准中的重要组成部分.STL 以模板类和模板函数的形式为程序员提供了各种数据结构和算法的精巧实现,程 ...

随机推荐

  1. hive随机采样

    hive> select * from account limit 10;OKaccount.accountname     account.accid   account.platid  ac ...

  2. ndoejs处理编码的爬虫

    var express=require('express');var http=require('http');var cheerio=require('cheerio');var fs=requir ...

  3. ubuntu-Linux下如何安装Tensorflow?

    http://wiki.jikexueyuan.com/project/tensorflow-zh/get_started/os_setup.html https://www.cnblogs.com/ ...

  4. Mysql中select的正确姿势

    引言 大家在开发中,还有很多童鞋在写查询语句的时候,习惯写下面这种不规范sql select * from table 而不写成下面的这种规范方式 select col1,col2,...,coln ...

  5. day18-列表生成式、迭代器

    1.列表生成式,也叫列表推导式 即List Comprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式.优点:构造简单,一行完成缺点:不能排错,不能构建复杂的数据结 ...

  6. google event

    一目了然,也不用多说了,随便记录下,内部实现基于观察者模式 TestEvent public class TestEvent { private final int message; public T ...

  7. 微服务-springcloud

    感觉微服务都差不多概念,最近稍微看了下springcloud,感觉入门还是很简单的,框架用用就那么回事,深入的话需要很多时间投入了 学一个东西,我推荐首先从概念上了解到他是做什么的,什么时候需要,基本 ...

  8. 剑指offer例题——旋转数组的最小数字

    题目:把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. 输入一个非减排序的数组的一个旋转,输出旋转数组的最小元素. 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转, ...

  9. 用ADO操作数据库的方法步骤(ZT)

    http://www.cppblog.com/changshoumeng/articles/113437.html 学习ADO时总结的一些经验 用ADO操作数据库的方法步骤 ADO接口简介 ADO库包 ...

  10. How ASP.NET MVC Works ? (Artech)

    一.ASP.NET + MVC IIS与ASP.NET管道 MVC.MVP以及Model2[上篇] MVC.MVP以及Model2[下篇] ASP.NET MVC是如何运行的[1]: 建立在“伪”MV ...