]>
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_TUPLE_EXPAND_10032005_0815) | |
9 | #define FUSION_TUPLE_EXPAND_10032005_0815 | |
10 | ||
11 | #include <boost/preprocessor/iterate.hpp> | |
12 | #include <boost/preprocessor/repetition/enum_params.hpp> | |
13 | #include <boost/preprocessor/repetition/enum_binary_params.hpp> | |
14 | ||
15 | #define BOOST_PP_FILENAME_1 \ | |
16 | <boost/fusion/tuple/detail/tuple_expand.hpp> | |
17 | #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE) | |
18 | #include BOOST_PP_ITERATE() | |
19 | ||
20 | #endif | |
21 | #else // defined(BOOST_PP_IS_ITERATING) | |
22 | /////////////////////////////////////////////////////////////////////////////// | |
23 | // | |
24 | // Preprocessor vertical repetition code | |
25 | // | |
26 | /////////////////////////////////////////////////////////////////////////////// | |
27 | ||
28 | #define N BOOST_PP_ITERATION() | |
29 | ||
30 | BOOST_FUSION_GPU_ENABLED | |
31 | #if N == 1 | |
32 | explicit | |
33 | #endif | |
34 | tuple(BOOST_PP_ENUM_BINARY_PARAMS( | |
35 | N, typename detail::call_param<T, >::type arg)) | |
36 | : base_type(BOOST_PP_ENUM_PARAMS(N, arg)) {} | |
37 | ||
38 | template <BOOST_PP_ENUM_PARAMS(N, typename U)> | |
39 | BOOST_FUSION_GPU_ENABLED | |
40 | tuple(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs) | |
41 | : base_type(rhs) {} | |
42 | ||
43 | template <BOOST_PP_ENUM_PARAMS(N, typename U)> | |
44 | BOOST_FUSION_GPU_ENABLED | |
45 | tuple& operator=(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs) | |
46 | { | |
47 | base_type::operator=(rhs); | |
48 | return *this; | |
49 | } | |
50 | ||
51 | #undef N | |
52 | #endif // defined(BOOST_PP_IS_ITERATING) | |
53 |