检索迭代器到按照指定的容器的最后一个元素的元素。
template<class Container>
auto end(Container& cont)
-> decltype(cont.end());
template<class Container>
auto end(const Container& cont)
-> decltype(cont.end());
template<class Ty, class Size>
Ty *end(Ty (&array)[Size]);
参数
cont
一个容器。array
数组类型 Ty对象。
返回值
前两个模板函数返回 cont.end()。
第三个模板函数返回 &array[Size]。
要求
标头: <iterator>
命名空间: std