zoukankan      html  css  js  c++  java
  • STL::forward_list

    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:

    所有博文均为原著,如若转载,请注明出处!
  • 相关阅读:
    梦幻如初,心不忘。
    整数集和求并
    ACTF 2014 Write up
    适用web的图片
    jqGrid
    angularjs
    【转载】FPGA异步时钟设计中的同步策略
    Cordic的学习之硬件实现
    Cordic的学习初步
    DDS---三角函数发生器的用法
  • 原文地址:https://www.cnblogs.com/zpcoding/p/10330688.html
Copyright © 2011-2022 走看看