Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:50:31

0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002 
0003     #include <boost/proto/transform/detail/preprocessed/pack_impl.hpp>
0004 
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006 
0007     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0008         #pragma wave option(preserve: 2, line: 0, output: "preprocessed/pack_impl.hpp")
0009     #endif
0010 
0011     ///////////////////////////////////////////////////////////////////////////////
0012     /// \file pack_impl.hpp
0013     /// Contains helpers for pseudo-pack expansion.
0014     //
0015     //  Copyright 2012 Eric Niebler. Distributed under the Boost
0016     //  Software License, Version 1.0. (See accompanying file
0017     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0018 
0019     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0020         #pragma wave option(preserve: 1)
0021     #endif
0022 
0023     #define BOOST_PP_ITERATION_PARAMS_1                                                             \
0024         (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), <boost/proto/transform/detail/pack_impl.hpp>))
0025     #include BOOST_PP_ITERATE()
0026 
0027     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0028         #pragma wave option(output: null)
0029     #endif
0030 
0031 #else
0032     #if BOOST_PP_ITERATION_DEPTH() == 1
0033         #define N BOOST_PP_ITERATION()
0034         #define M BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N)
0035         #define M0(Z, X, D)  typename expand_pattern_helper<proto::_child_c<X>, Fun>::type
0036 
0037         template<typename Fun, typename Cont>
0038         struct expand_pattern<BOOST_PP_INC(N), Fun, Cont>
0039           : Cont::template cat<BOOST_PP_ENUM(BOOST_PP_INC(N), M0, ~)>
0040         {
0041             BOOST_MPL_ASSERT_MSG(
0042                 (expand_pattern_helper<proto::_child_c<0>, Fun>::applied::value)
0043               , NO_PACK_EXPRESSION_FOUND_IN_UNPACKING_PATTERN
0044               , (Fun)
0045             );
0046         };
0047 
0048         template<typename Ret BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0049         struct BOOST_PP_CAT(expand_pattern_rest_, N)
0050         {
0051             template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_INC(M), typename C, void)>
0052             struct cat;
0053 
0054             #define BOOST_PP_ITERATION_PARAMS_2                                                     \
0055                 (3, (1, M, <boost/proto/transform/detail/pack_impl.hpp>))
0056             #include BOOST_PP_ITERATE()
0057         };
0058         #undef M0
0059         #undef M
0060         #undef N
0061     #else
0062         #define I BOOST_PP_ITERATION()
0063         #define J BOOST_PP_RELATIVE_ITERATION(1)
0064             template<BOOST_PP_ENUM_PARAMS(I, typename C)>
0065             struct cat<BOOST_PP_ENUM_PARAMS(I, C)>
0066             {
0067                 typedef msvc_fun_workaround<Ret(BOOST_PP_ENUM_PARAMS(J, A) BOOST_PP_COMMA_IF(J) BOOST_PP_ENUM_PARAMS(I, C))> type;
0068             };
0069         #undef J
0070         #undef I
0071     #endif
0072 #endif