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

Convert a fusion sequence to a map.

Synopsis
template <typename Sequence>
typename result_of::as_map<Sequence>::type
as_map(Sequence& seq);

template <typename Sequence>
typename result_of::as_map<Sequence const>::type
as_map(Sequence const& seq);
Parameters

Parameter

Requirement

Description

seq

An instance of Sequence

The sequence to convert.

Expression Semantics
as_map(seq);

Return type: result_of::as_map<Sequence>::type

Semantics: Convert a fusion sequence, seq, to a map.

Precondition: The elements of the sequence are assumed to be __fusion_pair__s. There may be no duplicate fusion::pair key types.

Header
#include <boost/fusion/container/map/convert.hpp>
#include <boost/fusion/include/as_map.hpp>
Example
as_map(make_vector(
    make_pair<int>('X')
  , make_pair<double>("Men")))

PrevUpHomeNext