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

Click here to view the latest version of this page.
PrevUpHomeNext
map_tie
Description

Returns the result type of map_tie.

Synopsis
template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
struct map_tie;

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

#define FUSION_MAX_MAP_SIZE 20
Parameters

Parameter

Requirement

Description

K0, K1,... KN

Any type

The key types for map_tie

D0, D1,... DN

Any type

The arguments types for map_tie

Expression Semantics
result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type;

Return type: map<pair<K0, D0&>, pair<K1, D1&>,... pair<KN, DN&> >

Semantics: Create a map of references from D0, D1,... DN with keys K0, K1,... KN

Header
#include <boost/fusion/container/generation/map_tie.hpp>
#include <boost/fusion/include/map_tie.hpp>
Example
struct int_key;
struct double_key;
...
result_of::map_tie<int_key, double_key, int, double>::type

PrevUpHomeNext