📄 container.qbk
字号:
[heading Description]Returns the result type of __make_map__.[heading 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`[footnote`map` is implemented in terms of the vector. That is why we reuse`FUSION_MAX_VECTOR_SIZE`] elements, where `FUSION_MAX_VECTOR_SIZE` is a userdefinable predefined maximum that defaults to `10`. You may define thepreprocessor constant `FUSION_MAX_VECTOR_SIZE` before including any Fusionheader to change the default. Example: #define FUSION_MAX_VECTOR_SIZE 20[heading Parameters][table [[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`]]][heading 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.[heading Header] #include <boost/fusion/container/generation/make_map.hpp> #include <boost/fusion/include/make_map.hpp>[heading Example] result_of::make_map<int, double, char, double>::type[heading See also]__fusion_pair__[endsect][section list_tie][heading Description]Returns the result type of __list_tie__.[heading Synopsis] template <typename T0, typename T1,... typename TN> struct list_tie;The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaultsto `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE`before including any Fusion header to change the default. Example: #define FUSION_MAX_LIST_SIZE 20[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`T0, T1,... TN`] [Any type] [The arguments to `list_tie`]]][heading Expression Semantics] result_of::list_tie<T0, T1,... TN>::type;[*Return type]: __list__<T0&, T1&,... TN&>[*Semantics]: Create a __list__ of references from `T0, T1,... TN`.[heading Header] #include <boost/fusion/container/generation/list_tie.hpp> #include <boost/fusion/include/list_tie.hpp>[heading Example] result_of::list_tie<int, double>::type[endsect][section vector_tie][heading Description]Returns the result type of __vector_tie__.[heading Synopsis] template <typename T0, typename T1,... typename TN> struct vector_tie;The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements,where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum thatdefaults to `10`. You may define the preprocessor constant`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change thedefault. Example: #define FUSION_MAX_VECTOR_SIZE 20[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`T0, T1,... TN`] [Any type] [The arguments to `vector_tie`]]][heading Expression Semantics] result_of::vector_tie<T0, T1,... TN>::type;[*Return type]: __vector__<T0&, T1&,... TN&>[*Semantics]: Create a __vector__ of references from `T0, T1,... TN`.[heading Header] #include <boost/fusion/container/generation/vector_tie.hpp> #include <boost/fusion/include/vector_tie.hpp>[heading Example] result_of::vector_tie<int, double>::type[endsect][section map_tie][heading Description]Returns the result type of __map_tie__.[heading 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 thatdefaults to `10`. You may define the preprocessor constant`FUSION_MAX_MAP_SIZE` before including any Fusion header to change thedefault. Example: #define FUSION_MAX_MAP_SIZE 20[heading Parameters][table [[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`]]][heading 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`[heading Header] #include <boost/fusion/container/generation/map_tie.hpp> #include <boost/fusion/include/map_tie.hpp>[heading Example] struct int_key; struct double_key; ... result_of::map_tie<int_key, double_key, int, double>::type[endsect][endsect][endsect][section Conversion]All fusion sequences can be converted to one of the __containers__ typesusing one of these conversion functions.[heading Header] #include <boost/fusion/include/convert.hpp>[section Functions][section as_list][heading Description]Convert a fusion sequence to a __list__.[heading Synopsis] template <typename Sequence> typename result_of::as_list<Sequence>::type as_list(Sequence& seq); template <typename Sequence> typename result_of::as_list<Sequence const>::type as_list(Sequence const& seq);[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`seq`] [An instance of Sequence] [The sequence to convert.]]][heading Expression Semantics] as_list(seq);[*Return type]: __result_of_as_list__`<Sequence>::type`[*Semantics]: Convert a fusion sequence, `seq`, to a __list__.[heading Header] #include <boost/fusion/container/list/convert.hpp> #include <boost/fusion/include/as_list.hpp>[heading Example] as_list(__make_vector__('x', 123, "hello"))[endsect][section as_vector][heading Description]Convert a fusion sequence to a __vector__.[heading Synopsis] template <typename Sequence> typename result_of::as_vector<Sequence>::type as_vector(Sequence& seq); template <typename Sequence> typename result_of::as_vector<Sequence const>::type as_vector(Sequence const& seq);[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`seq`] [An instance of Sequence] [The sequence to convert.]]][heading Expression Semantics] as_vector(seq);[*Return type]: __result_of_as_vector__`<Sequence>::type`[*Semantics]: Convert a fusion sequence, `seq`, to a __vector__.[heading Header] #include <boost/fusion/container/vector/convert.hpp> #include <boost/fusion/include/as_vector.hpp>[heading Example] as_vector(__make_list__('x', 123, "hello"))[endsect][section as_set][heading Description]Convert a fusion sequence to a __set__.[heading Synopsis] template <typename Sequence> typename result_of::as_set<Sequence>::type as_set(Sequence& seq); template <typename Sequence> typename result_of::as_set<Sequence const>::type as_set(Sequence const& seq);[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`seq`] [An instance of Sequence] [The sequence to convert.]]][heading Expression Semantics] as_set(seq);[*Return type]: __result_of_as_set__`<Sequence>::type`[*Semantics]: Convert a fusion sequence, `seq`, to a __set__.[*Precondition]: There may be no duplicate key types.[heading Header] #include <boost/fusion/container/set/convert.hpp> #include <boost/fusion/include/as_set.hpp>[heading Example] as_set(__make_vector__('x', 123, "hello"))[endsect][section as_map][heading Description]Convert a fusion sequence to a __map__.[heading 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);[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`seq`] [An instance of Sequence] [The sequence to convert.]]][heading 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.[heading Header] #include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/include/as_map.hpp>[heading Example] as_map(__make_vector__( __fusion_make_pair__<int>('X') , __fusion_make_pair__<double>("Men")))[endsect][endsect][section Metafunctions][section as_list][heading Description]Returns the result type of __as_list__.[heading Synopsis] template <typename Sequence> struct as_list;[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]]][heading Expression Semantics] result_of::as_list<Sequence>::type;[*Return type]: A __list__ with same elements as the input sequence,`Sequence`.[*Semantics]: Convert a fusion sequence, `Sequence`, to a __list__.[heading Header] #include <boost/fusion/container/list/convert.hpp> #include <boost/fusion/include/as_list.hpp>[heading Example] result_of::as_list<__vector__<char, int> >::type[endsect][section as_vector][heading Description]Returns the result type of __as_vector__.[heading Synopsis] template <typename Sequence> struct as_vector;[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]][heading Expression Semantics] result_of::as_vector<Sequence>::type;[*Return type]: A __vector__ with same elements as the input sequence,`Sequence`.[*Semantics]: Convert a fusion sequence, `Sequence`, to a __vector__.[heading Header] #include <boost/fusion/container/vector/convert.hpp> #include <boost/fusion/include/as_vector.hpp>[heading Example] result_of::as_vector<__list__<char, int> >::type[endsect][section as_set][heading Description]Returns the result type of __as_set__.[heading Synopsis] template <typename Sequence> struct as_set;[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]][heading Expression Semantics] result_of::as_set<Sequence>::type;[*Return type]: A __set__ with same elements as the input sequence,`Sequence`.[*Semantics]: Convert a fusion sequence, `Sequence`, to a __set__.[*Precondition]: There may be no duplicate key types.[heading Header] #include <boost/fusion/container/set/convert.hpp> #include <boost/fusion/include/as_set.hpp>[heading Example] result_of::as_set<__vector__<char, int> >::type[endsect][section as_map][heading Description]Returns the result type of __as_map__.[heading Synopsis] template <typename Sequence> struct as_map;[heading Parameters][table [[Parameter] [Requirement] [Description]] [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]][heading Expression Semantics] result_of::as_map<Sequence>::type;[*Return type]: A __map__ with same elements as the input sequence,`Sequence`.[*Semantics]: Convert a fusion sequence, `Sequence`, 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.[heading Header] #include <boost/fusion/container/map/convert.hpp> #include <boost/fusion/include/as_map.hpp>[heading Example] result_of::as_map<__vector__< __fusion_pair__<int, char> , __fusion_pair__<double, std::string> > >::type[endsect][endsect][endsect][endsect]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -