std::forward_list<T,Allocator>::before_begin, cbefore_begin

来自cppreference.com
 
 
 
 
iterator before_begin() noexcept;
(1) (C++11 起)
(C++26 起为 constexpr)
const_iterator before_begin() const noexcept;
(2) (C++11 起)
(C++26 起为 constexpr)
const_iterator cbefore_begin() const noexcept;
(3) (C++11 起)
(C++26 起为 constexpr)

返回一个不可解引用的迭代器,自增始前迭代器恰好给出与从 begin()/cbegin() 获得者相同的迭代器。

仅有的使用情况是在函数 insert_after()emplace_after()erase_after()splice_after() 和自增运算符中。

目录

[编辑] 返回值

表示首迭代器前一位置的迭代器。

[编辑] 复杂度

常数。

[编辑] 示例

[编辑] 参阅

返回指向起始的迭代器
(公开成员函数) [编辑]
返回指向末尾的迭代器
(公开成员函数) [编辑]