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

This is the documentation for a snapshot of the master branch, built from commit c89e626766.
PrevUpHomeNext

next

Description

Returns the type of the next iterator in a sequence.

Synopsis
template<
    typename I
    >
struct next
{
    typedef unspecified type;
};

Table 1.13. Parameters

Parameter

Requirement

Description

I

Model of Forward Iterator

Operation's argument


Expression Semantics
result_of::next<I>::type

Return type: A model of the same iterator concept as I.

Semantics: Returns an iterator to the next element in the sequence after I.

Header
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/include/next.hpp>
Example
typedef vector<int,double> vec;
typedef result_of::next<result_of::begin<vec>::type>::type second;

BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, double>));

PrevUpHomeNext