...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Convert a fusion sequence to a map
.
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);
Parameter |
Requirement |
Description |
---|---|---|
|
An instance of Sequence |
The sequence to convert. |
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.
#include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/include/as_map.hpp>
as_map(make_vector
(make_pair
<int>('X') ,make_pair
<double>("Men")))