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/expand_pack.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/expand_pack.hpp")
0009     #endif
0010 
0011     ///////////////////////////////////////////////////////////////////////////////
0012     /// \file expand_pack.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_PROTO_MAX_ARITY, <boost/proto/transform/detail/expand_pack.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     #define N BOOST_PP_ITERATION()
0033     #define M0(Z, X, DATA) typename expand_pattern_helper<Tfx, BOOST_PP_CAT(A, X)>::type
0034     #define M1(Z, X, DATA) expand_pattern_helper<Tfx, BOOST_PP_CAT(A, X)>::applied::value ||
0035 
0036         template<typename Tfx, typename Ret BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
0037         struct expand_pattern_helper<Tfx, Ret(BOOST_PP_ENUM_PARAMS(N, A))>
0038         {
0039             typedef Ret (*type)(BOOST_PP_ENUM(N, M0, ~));
0040             typedef mpl::bool_<BOOST_PP_REPEAT(N, M1, ~) false> applied;
0041         };
0042 
0043     #undef M1
0044     #undef M0
0045     #undef N
0046 #endif