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

deref_data

Description

Deferences the data property associated with the element referenced by an associative iterator.

Synopsis
template<
    typename I
    >
typename result_of::deref_data<I>::type deref_data(I const& i);

Table 1.7. Parameters

Parameter

Requirement

Description

i

Model of Associative Iterator

Operation's argument


Expression Semantics
deref_data(i);

Return type: result_of::deref_data<I>::type

Semantics: Dereferences the data property associated with the element referenced by an associative iterator i.

Header
#include <boost/fusion/iterator/deref_data.hpp>
#include <boost/fusion/include/deref_data.hpp>
Example
typedef map<pair<float, int&> > map;

int i(0);
map m(1.0f,i);
assert(deref_data(begin(m)) == 0);
assert(&(deref_data(begin(m))) == &i);

PrevUpHomeNext