Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext
end
Description

Returns an iterator pointing to one element past the end of the sequence.

Synopsis
template <typename Sequence>
typename result_of::end<Sequence>::type
end(Sequence& seq);

template <typename Sequence>
typename result_of::end<Sequence const>::type
end(Sequence const& seq);
Parameters

Parameter

Requirement

Description

seq

Model of Forward Sequence

The sequence we wish to get an iterator from.

Expression Semantics
end(seq);

Return type:

Semantics: Returns an iterator pointing to one element past the end of the sequence.

Header
#include <boost/fusion/sequence/intrinsic/end.hpp>
#include <boost/fusion/include/end.hpp>
Example
vector<int, int, int> v(1, 2, 3);
assert(deref(prior(end(v))) == 3);

PrevUpHomeNext