make_map

| Home | Libraries | People | FAQ | More

##### make_map

###### Description

Returns the result type of `make_map`.

###### Synopsis

    template <
        typename K0, typename K1,... typename KN
      , typename T0, typename T1,... typename TN>
    struct make_map;

The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` [12] elements, where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that defaults to `10`. You may define the preprocessor constant `FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the default. Example:

    #define FUSION_MAX_VECTOR_SIZE 20

###### Parameters

Parameter | Requirement | Description
--- | --- | ---
`K0, K1,... KN` | Any type | Keys associated with `T0, T1,... TN`
`T0, T1,... TN` | Any type | Data associated with keys `K0, K1,... KN`

###### Expression Semantics

    resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type;

Return type: `result_of::make_map``<K0, K0,... KN, T0, T1,... TN>::type`

Semantics: A `map` with `fusion::pair` elements where the `second_type` is converted following the rules for element conversion.

Precondition: There may be no duplicate key types.

###### Header

    #include <boost/fusion/container/generation/make_map.hpp>
    #include <boost/fusion/include/make_map.hpp>

###### Example

    result_of::make_map<int, double, char, double>::type

###### See also

`fusion::pair`

[12] `map` is implemented in terms of the vector. That is why we reuse `FUSION_MAX_VECTOR_SIZE`