...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Moves an iterator 1 position forwards.
template< typename I > typename result_of::next<I>::type next(I const& i);
Table 1.3. Parameters
Parameter |
Requirement |
Description |
---|---|---|
i |
Model of Forward Iterator |
Operation's argument |
next(i);
Return type: A model of the same iterator concept as i.
Semantics: Returns an iterator to the next element after i.
#include <boost/fusion/iterator/next.hpp> #include <boost/fusion/include/next.hpp>
typedef vector<int,int,int> vec; vec v(1,2,3); assert(deref(begin(v)) == 1); assert(deref(next(begin(v))) == 2); assert(deref(next(next(begin(v)))) == 3);