| Home | Libraries | People | FAQ | More

#### value_of

##### Description

Returns the type stored at the position of an iterator.

##### Synopsis

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

Table 1.11. Parameters

Parameter | Requirement | Description
--- | --- | ---
`I` | Model of Forward Iterator | Operation's argument

##### Expression Semantics

    result_of::value_of<I>::type

Return type: Any type

Semantics: Returns the type stored in a sequence at iterator position `I`.

##### Header

    #include <boost/fusion/iterator/value_of.hpp>
    #include <boost/fusion/include/value_of.hpp>

##### Example

    typedef vector<int,int&,const int&> vec;
    typedef result_of::begin<vec>::type first;
    typedef result_of::next<first>::type second;
    typedef result_of::next<second>::type third;

    BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, int>));
    BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int&>));
    BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<third>::type, const int&>));