Partager via


end

Retrieves an iterator to the element that follows the last element in the specified container.

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]); 

Parameters

  • cont
    A container.

  • array
    An array of objects of type Ty.

Return Value

The first two template functions return cont.end() (the first is non-constant and the second is constant).

The third template function returns array + Size.

Remarks

For a code example, see begin.

Requirements

Header: <iterator>

Namespace: std

See Also

Reference

<iterator>

begin

cbegin

cend