]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2001-2011 Joel de Guzman | |
3 | ||
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_MAP_FORWARD_CTOR_07222005_0106) | |
9 | #define FUSION_MAP_FORWARD_CTOR_07222005_0106 | |
10 | ||
11 | #define FUSION_FORWARD_CTOR_FORWARD(z, n, _) BOOST_FUSION_FWD_ELEM(U##n, _##n) | |
12 | ||
13 | #define BOOST_PP_FILENAME_1 \ | |
14 | <boost/fusion/container/map/detail/cpp03/map_forward_ctor.hpp> | |
15 | #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_MAP_SIZE) | |
16 | #include BOOST_PP_ITERATE() | |
17 | ||
18 | #undef FUSION_FORWARD_CTOR_FORWARD | |
19 | #endif | |
20 | #else // defined(BOOST_PP_IS_ITERATING) | |
21 | /////////////////////////////////////////////////////////////////////////////// | |
22 | // | |
23 | // Preprocessor vertical repetition code | |
24 | // | |
25 | /////////////////////////////////////////////////////////////////////////////// | |
26 | ||
27 | #define N BOOST_PP_ITERATION() | |
28 | ||
29 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED | |
30 | #if N == 1 | |
31 | explicit | |
32 | #endif | |
33 | map(BOOST_PP_ENUM_BINARY_PARAMS(N, typename detail::call_param<T, >::type arg)) | |
34 | : data(BOOST_PP_ENUM_PARAMS(N, arg)) {} | |
35 | ||
36 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) | |
37 | FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) | |
38 | #endif | |
39 | #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \ | |
40 | (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) | |
41 | template <BOOST_PP_ENUM_PARAMS(N, typename U)> | |
42 | BOOST_FUSION_GPU_ENABLED | |
43 | #if N == 1 | |
44 | explicit | |
45 | #endif | |
46 | map(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && arg) | |
47 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) && \ | |
48 | N == 1 | |
49 | // workaround for MSVC 10 | |
50 | FUSION_HASH if defined(BOOST_MSVC) && (BOOST_MSVC == 1700) | |
51 | , typename enable_if<is_same<U0, T0> >::type* = 0 | |
52 | FUSION_HASH endif | |
53 | #endif | |
54 | ) | |
55 | : data(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, arg)) {} | |
56 | #endif | |
57 | #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) | |
58 | FUSION_HASH endif | |
59 | #endif | |
60 | ||
61 | #undef N | |
62 | #endif // defined(BOOST_PP_IS_ITERATING) | |
63 |