1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef BOOST_PP_IS_ITERATING
8 #if !defined(FUSION_PP_MAKE_MAP_07222005_1247)
9 #define FUSION_PP_MAKE_MAP_07222005_1247
11 #include <boost/preprocessor/iterate.hpp>
12 #include <boost/preprocessor/repetition/enum_params.hpp>
13 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
14 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
15 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
16 #include <boost/fusion/container/map/map.hpp>
17 #include <boost/fusion/support/detail/as_fusion_element.hpp>
18 #include <boost/fusion/support/pair.hpp>
20 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
21 #include <boost/fusion/container/generation/detail/preprocessed/make_map.hpp>
23 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
24 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_map" FUSION_MAX_MAP_SIZE_STR".hpp")
27 /*=============================================================================
28 Copyright (c) 2001-2011 Joel de Guzman
30 Distributed under the Boost Software License, Version 1.0. (See accompanying
31 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
33 This is an auto-generated file. Do not edit!
34 ==============================================================================*/
36 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
37 #pragma wave option(preserve: 1)
40 namespace boost { namespace fusion
47 BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
48 FUSION_MAX_VECTOR_SIZE, typename K, void_)
49 , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
50 FUSION_MAX_VECTOR_SIZE, typename D, void_)
51 , typename Extra = void_
62 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
69 #define BOOST_FUSION_PAIR(z, n, data) \
72 , typename detail::as_fusion_element<BOOST_PP_CAT(D, n)>::type>
74 #define BOOST_FUSION_MAKE_PAIR(z, n, _) \
75 fusion::make_pair<BOOST_PP_CAT(K, n)>(BOOST_PP_CAT(_, n)) \
77 #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_map.hpp>
78 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
79 #include BOOST_PP_ITERATE()
81 #undef BOOST_FUSION_PAIR
82 #undef BOOST_FUSION_MAKE_PAIR
86 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
87 #pragma wave option(output: null)
90 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
93 #else // defined(BOOST_PP_IS_ITERATING)
94 ///////////////////////////////////////////////////////////////////////////////
96 // Preprocessor vertical repetition code
98 ///////////////////////////////////////////////////////////////////////////////
100 #define N BOOST_PP_ITERATION()
105 BOOST_PP_ENUM_PARAMS(N, typename K)
106 , BOOST_PP_ENUM_PARAMS(N, typename D)
108 #define TEXT(z, n, text) , text
109 struct make_map<BOOST_PP_ENUM_PARAMS(N, K), BOOST_PP_ENUM_PARAMS(N, D) BOOST_PP_REPEAT_FROM_TO(N, FUSION_MAX_VECTOR_SIZE, TEXT, void_) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_VECTOR_SIZE, TEXT, void_)>
112 typedef map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)> type;
117 BOOST_PP_ENUM_PARAMS(N, typename K)
118 , BOOST_PP_ENUM_PARAMS(N, typename D)
120 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
121 inline map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>
122 make_map(BOOST_PP_ENUM_BINARY_PARAMS(N, D, const& arg))
124 return map<BOOST_PP_ENUM(N, BOOST_FUSION_PAIR, _)>(
125 BOOST_PP_ENUM(N, BOOST_FUSION_MAKE_PAIR, arg));
129 #endif // defined(BOOST_PP_IS_ITERATING)