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

Returns the type that will be returned by dereferencing the data property referenced by an associative iterator.

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

Table 1.21. Parameters

Parameter

Requirement

Description

I

Model of Associative Iterator

Operation's argument


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

Return type: Any type

Semantics: Returns the result of dereferencing the data property referenced by an associative iterator of type I.

Header
#include <boost/fusion/iterator/deref_data.hpp>
#include <boost/fusion/include/deref_data.hpp>
Example
typedef map<pair<float, int> > map_type;
typedef boost::fusion::result_of::begin<map_type>::type i_type;
typedef boost::fusion::result_of::deref_data<i_type>::type r_type;
BOOST_STATIC_ASSERT((boost::is_same<r_type, int&>::value));

PrevUpHomeNext