Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:35:12

0001 /*=============================================================================
0002     Copyright (c) 2005-2012 Joel de Guzman
0003     Copyright (c) 2006 Dan Marsden
0004 
0005     Distributed under the Boost Software License, Version 1.0. (See accompanying
0006     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0007 ==============================================================================*/
0008 #ifndef BOOST_PP_IS_ITERATING
0009 #if !defined(FUSION_AS_DEQUE_20061213_2210)
0010 #define FUSION_AS_DEQUE_20061213_2210
0011 
0012 #include <boost/preprocessor/iterate.hpp>
0013 #include <boost/preprocessor/repetition/enum_params.hpp>
0014 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0015 #include <boost/preprocessor/repetition/repeat.hpp>
0016 #include <boost/preprocessor/cat.hpp>
0017 #include <boost/preprocessor/inc.hpp>
0018 #include <boost/preprocessor/dec.hpp>
0019 #include <boost/fusion/container/deque/deque.hpp>
0020 #include <boost/fusion/iterator/value_of.hpp>
0021 #include <boost/fusion/iterator/deref.hpp>
0022 #include <boost/fusion/iterator/next.hpp>
0023 
0024 namespace boost { namespace fusion { namespace detail
0025 {
0026 BOOST_FUSION_BARRIER_BEGIN
0027 
0028     template <int size>
0029     struct as_deque
0030     {
0031         BOOST_STATIC_ASSERT_MSG(
0032             size <= FUSION_MAX_DEQUE_SIZE
0033           , "FUSION_MAX_DEQUE_SIZE limit is too low"
0034         );
0035     };
0036 
0037     template <>
0038     struct as_deque<0>
0039     {
0040         template <typename Iterator>
0041         struct apply
0042         {
0043             typedef deque<> type;
0044         };
0045 
0046         template <typename Iterator>
0047         BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0048         static typename apply<Iterator>::type
0049         call(Iterator)
0050         {
0051             return deque<>();
0052         }
0053     };
0054 
0055 BOOST_FUSION_BARRIER_END
0056 }}}
0057 
0058 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
0059 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/as_deque.hpp>
0060 #else
0061 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0062 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/as_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
0063 #endif
0064 
0065 /*=============================================================================
0066     Copyright (c) 2001-2011 Joel de Guzman
0067 
0068     Distributed under the Boost Software License, Version 1.0. (See accompanying
0069     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0070 
0071     This is an auto-generated file. Do not edit!
0072 ==============================================================================*/
0073 
0074 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0075 #pragma wave option(preserve: 1)
0076 #endif
0077 
0078 namespace boost { namespace fusion { namespace detail
0079 {
0080 BOOST_FUSION_BARRIER_BEGIN
0081 
0082 #define BOOST_FUSION_NEXT_ITERATOR(z, n, data)                                  \
0083     typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type          \
0084         BOOST_PP_CAT(I, BOOST_PP_INC(n));
0085 
0086 #define BOOST_FUSION_NEXT_CALL_ITERATOR(z, n, data)                             \
0087     typename gen::BOOST_PP_CAT(I, BOOST_PP_INC(n))                              \
0088         BOOST_PP_CAT(i, BOOST_PP_INC(n)) = fusion::next(BOOST_PP_CAT(i, n));
0089 
0090 #define BOOST_FUSION_VALUE_OF_ITERATOR(z, n, data)                              \
0091     typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type      \
0092         BOOST_PP_CAT(T, n);
0093 
0094 #define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/cpp03/as_deque.hpp>
0095 #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
0096 #include BOOST_PP_ITERATE()
0097 
0098 #undef BOOST_FUSION_NEXT_ITERATOR
0099 #undef BOOST_FUSION_NEXT_CALL_ITERATOR
0100 #undef BOOST_FUSION_VALUE_OF_ITERATOR
0101 
0102 BOOST_FUSION_BARRIER_END
0103 }}}
0104 
0105 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
0106 #pragma wave option(output: null)
0107 #endif
0108 
0109 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
0110 
0111 #endif
0112 #else // defined(BOOST_PP_IS_ITERATING)
0113 ///////////////////////////////////////////////////////////////////////////////
0114 //
0115 //  Preprocessor vertical repetition code
0116 //
0117 ///////////////////////////////////////////////////////////////////////////////
0118 
0119 #define N BOOST_PP_ITERATION()
0120 
0121     template <>
0122     struct as_deque<N>
0123     {
0124         template <typename I0>
0125         struct apply
0126         {
0127             BOOST_PP_REPEAT(N, BOOST_FUSION_NEXT_ITERATOR, _)
0128             BOOST_PP_REPEAT(N, BOOST_FUSION_VALUE_OF_ITERATOR, _)
0129             typedef deque<BOOST_PP_ENUM_PARAMS(N, T)> type;
0130         };
0131 
0132         template <typename Iterator>
0133         BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0134         static typename apply<Iterator>::type
0135         call(Iterator const& i0)
0136         {
0137             typedef apply<Iterator> gen;
0138             typedef typename gen::type result;
0139             BOOST_PP_REPEAT(BOOST_PP_DEC(N), BOOST_FUSION_NEXT_CALL_ITERATOR, _)
0140             return result(BOOST_PP_ENUM_PARAMS(N, *i));
0141         }
0142     };
0143 
0144 #undef N
0145 #endif // defined(BOOST_PP_IS_ITERATING)
0146