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
value_at_key
Description

Returns the actual element type associated with a Key from the Sequence.

Synopsis
template<
    typename Seq,
    typename Key>
struct value_at_key
{
    typedef unspecified type;
};

Table 1.35. Parameters

Parameter

Requirement

Description

Seq

A model of Associative Sequence

Argument sequence

Key

Any type

Key type


Expression Semantics
result_of::value_at_key<Seq, Key>::type

Return type: Any type.

Semantics: Returns the actual element type associated with key type Key in Seq.

Header
#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
#include <boost/fusion/include/value_at_key.hpp>
Example
typedef map<pair<int, char>, pair<char, char>, pair<double, char> > mymap;
BOOST_MPL_ASSERT((boost::is_same<result_of::at_key<mymap, int>::type, char>));

PrevUpHomeNext