Chris@16
|
1 /*=============================================================================
|
Chris@16
|
2 Copyright (c) 2001-2011 Joel de Guzman
|
Chris@16
|
3
|
Chris@16
|
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 ==============================================================================*/
|
Chris@16
|
7 #ifndef BOOST_PP_IS_ITERATING
|
Chris@16
|
8 #if !defined(FUSION_TUPLE_EXPAND_10032005_0815)
|
Chris@16
|
9 #define FUSION_TUPLE_EXPAND_10032005_0815
|
Chris@16
|
10
|
Chris@16
|
11 #include <boost/preprocessor/iterate.hpp>
|
Chris@16
|
12 #include <boost/preprocessor/repetition/enum_params.hpp>
|
Chris@16
|
13 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
Chris@16
|
14
|
Chris@16
|
15 #define BOOST_PP_FILENAME_1 \
|
Chris@16
|
16 <boost/fusion/tuple/detail/tuple_expand.hpp>
|
Chris@16
|
17 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
Chris@16
|
18 #include BOOST_PP_ITERATE()
|
Chris@16
|
19
|
Chris@16
|
20 #endif
|
Chris@16
|
21 #else // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
22 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
23 //
|
Chris@16
|
24 // Preprocessor vertical repetition code
|
Chris@16
|
25 //
|
Chris@16
|
26 ///////////////////////////////////////////////////////////////////////////////
|
Chris@16
|
27
|
Chris@16
|
28 #define N BOOST_PP_ITERATION()
|
Chris@16
|
29
|
Chris@101
|
30 BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
31 #if N == 1
|
Chris@16
|
32 explicit
|
Chris@16
|
33 #endif
|
Chris@16
|
34 tuple(BOOST_PP_ENUM_BINARY_PARAMS(
|
Chris@101
|
35 N, typename detail::call_param<T, >::type arg))
|
Chris@101
|
36 : base_type(BOOST_PP_ENUM_PARAMS(N, arg)) {}
|
Chris@16
|
37
|
Chris@16
|
38 template <BOOST_PP_ENUM_PARAMS(N, typename U)>
|
Chris@101
|
39 BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
40 tuple(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs)
|
Chris@16
|
41 : base_type(rhs) {}
|
Chris@16
|
42
|
Chris@16
|
43 template <BOOST_PP_ENUM_PARAMS(N, typename U)>
|
Chris@101
|
44 BOOST_FUSION_GPU_ENABLED
|
Chris@16
|
45 tuple& operator=(tuple<BOOST_PP_ENUM_PARAMS(N, U)> const& rhs)
|
Chris@16
|
46 {
|
Chris@16
|
47 base_type::operator=(rhs);
|
Chris@16
|
48 return *this;
|
Chris@16
|
49 }
|
Chris@16
|
50
|
Chris@16
|
51 #undef N
|
Chris@16
|
52 #endif // defined(BOOST_PP_IS_ITERATING)
|
Chris@16
|
53
|