1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #ifndef BOOST_PP_IS_ITERATING
9 #if !defined(FUSION_PP_MAP_TIE_20060814_1116)
10 #define FUSION_PP_MAP_TIE_20060814_1116
12 #include <boost/preprocessor/iterate.hpp>
13 #include <boost/preprocessor/repetition/enum_params.hpp>
14 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
15 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
16 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
17 #include <boost/fusion/container/map/map.hpp>
18 #include <boost/fusion/container/map/detail/cpp03/limits.hpp>
19 #include <boost/fusion/support/pair.hpp>
20 #include <boost/fusion/container/generation/pair_tie.hpp>
21 #include <boost/type_traits/add_reference.hpp>
23 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
24 #include <boost/fusion/container/generation/detail/preprocessed/map_tie.hpp>
26 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
27 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/map_tie" FUSION_MAX_MAP_SIZE_STR".hpp")
30 /*=============================================================================
31 Copyright (c) 2001-2011 Joel de Guzman
33 Distributed under the Boost Software License, Version 1.0. (See accompanying
34 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
36 This is an auto-generated file. Do not edit!
37 ==============================================================================*/
39 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
40 #pragma wave option(preserve: 1)
43 namespace boost { namespace fusion
50 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
51 FUSION_MAX_MAP_SIZE, typename K, void_)
52 , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
53 FUSION_MAX_MAP_SIZE, typename D, void_)
54 , typename Extra = void_
65 BOOST_FUSION_GPU_ENABLED inline map<>
71 #define BOOST_FUSION_TIED_PAIR(z, n, data) \
74 , typename add_reference<BOOST_PP_CAT(D, n)>::type>
76 #define BOOST_FUSION_PAIR_TIE(z, n, data) \
77 fusion::pair_tie<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
79 #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_map_tie.hpp>
80 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE)
81 #include BOOST_PP_ITERATE()
83 #undef BOOST_FUSION_PAIR
84 #undef BOOST_FUSION_MAKE_PAIR
88 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
89 #pragma wave option(output: null)
92 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
95 #else // defined(BOOST_PP_IS_ITERATING)
96 ///////////////////////////////////////////////////////////////////////////////
98 // Preprocessor vertical repetition code
100 ///////////////////////////////////////////////////////////////////////////////
102 #define N BOOST_PP_ITERATION()
107 BOOST_PP_ENUM_PARAMS(N, typename K)
108 , BOOST_PP_ENUM_PARAMS(N, typename D)
110 #define TEXT(z, n, text) , text
111 struct map_tie<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_MAP_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_MAP_SIZE, TEXT, void_)>
114 typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)> type;
119 BOOST_PP_ENUM_PARAMS(N, typename K)
120 , BOOST_PP_ENUM_PARAMS(N, typename D)
122 BOOST_FUSION_GPU_ENABLED
123 inline map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>
124 map_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, D, & _))
126 return map<BOOST_PP_ENUM(N, BOOST_FUSION_TIED_PAIR, _)>(
127 BOOST_PP_ENUM(N, BOOST_FUSION_PAIR_TIE, _));
131 #endif // defined(BOOST_PP_IS_ITERATING)