std::vector<T,Allocator>::end, std::vector<T,Allocator>::cend

来自cppreference.com
< cpp‎ | container‎ | vector

iterator end();
(C++11 前)
iterator end() noexcept;
(C++11 起)
const_iterator end() const;
(C++11 前)
const_iterator end() const noexcept;
(C++11 起)
const_iterator cend() const noexcept;
(C++11 起)

返回指向容器末元素后一元素的迭代器。

此元素表现为占位符;试图访问它导致未定义行为。

range-begin-end.svg

参数

(无)

返回值

指向后随最后元素的迭代器。

复杂度

常数。


参阅

返回指向容器第一个元素的迭代器
(公开成员函数)