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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Operator *

Description

Dereferences an iterator.

Synopsis
template<
    typename I
    >
typename result_of::deref<I>::type operator*(unspecified<I> const& i);

Table 1.9. Parameters

Parameter

Requirement

Description

i

Model of Forward Iterator

Operation's argument


Expression Semantics
*i

Return type: Equivalent to the return type of deref(i).

Semantics: Equivalent to deref(i).

Header
#include <boost/fusion/iterator/deref.hpp>
#include <boost/fusion/include/deref.hpp>
Example
typedef vector<int,int&> vec;

int i(0);
vec v(1,i);
assert(*begin(v) == 1);
assert(*next(begin(v)) == 0);
assert(&(*next(begin(v))) == &i);

PrevUpHomeNext