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_AS_VECTOR_09222005_0950)
9 #define FUSION_AS_VECTOR_09222005_0950
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/repeat.hpp>
15 #include <boost/preprocessor/cat.hpp>
16 #include <boost/preprocessor/inc.hpp>
17 #include <boost/preprocessor/dec.hpp>
18 #include <boost/fusion/container/vector/vector.hpp>
19 #include <boost/fusion/iterator/value_of.hpp>
20 #include <boost/fusion/iterator/deref.hpp>
21 #include <boost/fusion/iterator/next.hpp>
23 namespace boost { namespace fusion { namespace detail
25 BOOST_FUSION_BARRIER_BEGIN
33 template <typename Iterator>
36 typedef vector0<> type;
39 template <typename Iterator>
40 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
41 static typename apply<Iterator>::type
48 BOOST_FUSION_BARRIER_END
51 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
52 #include <boost/fusion/container/vector/detail/cpp03/preprocessed/as_vector.hpp>
54 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
55 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_vector" FUSION_MAX_VECTOR_SIZE_STR ".hpp")
58 /*=============================================================================
59 Copyright (c) 2001-2011 Joel de Guzman
61 Distributed under the Boost Software License, Version 1.0. (See accompanying
62 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
64 This is an auto-generated file. Do not edit!
65 ==============================================================================*/
67 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
68 #pragma wave option(preserve: 1)
71 namespace boost { namespace fusion { namespace detail
73 BOOST_FUSION_BARRIER_BEGIN
75 #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \
76 typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \
77 BOOST_PP_CAT(I, BOOST_PP_INC(n));
79 #define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data) \
80 typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n)) \
81 BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
83 #define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data) \
84 typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
87 #define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/cpp03/as_vector.hpp>
88 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
89 #include BOOST_PP_ITERATE()
91 #undef BOOST_FUSION_NEXT_ITERATOR
92 #undef BOOST_FUSION_NEXT_CALL_ITERATOR
93 #undef BOOST_FUSION_VALUE_OF_ITERATOR
95 BOOST_FUSION_BARRIER_END
98 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
99 #pragma wave option(output: null)
102 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
105 #else // defined(BOOST_PP_IS_ITERATING)
106 ///////////////////////////////////////////////////////////////////////////////
108 // Preprocessor vertical repetition code
110 ///////////////////////////////////////////////////////////////////////////////
112 #define N BOOST_PP_ITERATION()
117 template <typename I0>
120 BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
121 BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
122 typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
125 template <typename Iterator>
126 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
127 static typename apply<Iterator>::type
128 call(Iterator const& i0)
130 typedef apply<Iterator> gen;
131 typedef typename gen::type result;
132 BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
133 return result(BOOST_PP_ENUM_PARAMS(N, *i));
138 #endif // defined(BOOST_PP_IS_ITERATING)