Merge pull request #16 from wmamrak/patch-1

Update according to ticket #10403.
This commit is contained in:
Joel de Guzman
2014-08-26 22:29:38 +08:00

View File

@ -1468,13 +1468,17 @@ rules for __element_conversion__.
Returns the result type of __make_map__. Returns the result type of __make_map__.
The implementation depends on the support of variadic templates.
When variadic templates are not supported, make_map is a metafunction of the form:
[heading Synopsis] [heading Synopsis]
template < template <
typename K0, typename K1,... typename KN typename K0, typename K1,... typename KN
, typename T0, typename T1,... typename TN> , typename T0, typename T1,... typename TN>
struct make_map; struct make_map;
The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements, The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
defaults to `10`. You may define the preprocessor constant defaults to `10`. You may define the preprocessor constant
@ -1483,6 +1487,18 @@ default. Example:
#define FUSION_MAX_MAP_SIZE 20 #define FUSION_MAX_MAP_SIZE 20
When variadic templates are supported, make_map is a metafunction class of the form:
[heading Synopsis]
template <
typename K0, typename K1,... typename KN>
struct make_map
{
struct apply<
typename T0, typename T1,... typename TN>
};
[heading Parameters] [heading Parameters]
[table [table
@ -1493,9 +1509,16 @@ default. Example:
[heading Expression Semantics] [heading Expression Semantics]
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type; resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type;
#else
resulf_of::make_map<K0, K1,... KN>::apply<T0, T1,... TN>::type;
#endif
[*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type` [*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type`
when variadic templates are not supported, or
__result_of_make_map__`<K0, K0,... KN>::apply<T0, T1,... TN>::type`
when variadic templates are supported.
[*Semantics]: A __map__ with __fusion_pair__ elements where the [*Semantics]: A __map__ with __fusion_pair__ elements where the
`second_type` is converted following the rules for __element_conversion__. `second_type` is converted following the rules for __element_conversion__.
@ -1508,8 +1531,12 @@ default. Example:
#include <boost/fusion/include/make_map.hpp> #include <boost/fusion/include/make_map.hpp>
[heading Example] [heading Example]
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
result_of::make_map<int, double, char, double>::type result_of::make_map<int, double, char, double>::type
#else
result_of::make_map<int, double>::apply<char, double>::type
#endif
[heading See also] [heading See also]