annotate DEPENDENCIES/generic/include/boost/proto/transform/detail/pack_impl.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
Chris@16 2
Chris@16 3 #include <boost/proto/transform/detail/preprocessed/pack_impl.hpp>
Chris@16 4
Chris@16 5 #elif !defined(BOOST_PP_IS_ITERATING)
Chris@16 6
Chris@16 7 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 8 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/pack_impl.hpp")
Chris@16 9 #endif
Chris@16 10
Chris@16 11 ///////////////////////////////////////////////////////////////////////////////
Chris@16 12 /// \file pack_impl.hpp
Chris@16 13 /// Contains helpers for pseudo-pack expansion.
Chris@16 14 //
Chris@16 15 // Copyright 2012 Eric Niebler. Distributed under the Boost
Chris@16 16 // Software License, Version 1.0. (See accompanying file
Chris@16 17 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 18
Chris@16 19 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 20 #pragma wave option(preserve: 1)
Chris@16 21 #endif
Chris@16 22
Chris@16 23 #define BOOST_PP_ITERATION_PARAMS_1 \
Chris@16 24 (3, (0, BOOST_PP_DEC(BOOST_PROTO_MAX_ARITY), <boost/proto/transform/detail/pack_impl.hpp>))
Chris@16 25 #include BOOST_PP_ITERATE()
Chris@16 26
Chris@16 27 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
Chris@16 28 #pragma wave option(output: null)
Chris@16 29 #endif
Chris@16 30
Chris@16 31 #else
Chris@16 32 #if BOOST_PP_ITERATION_DEPTH() == 1
Chris@16 33 #define N BOOST_PP_ITERATION()
Chris@16 34 #define M BOOST_PP_SUB(BOOST_PROTO_MAX_ARITY, N)
Chris@16 35 #define M0(Z, X, D) typename expand_pattern_helper<proto::_child_c<X>, Fun>::type
Chris@16 36
Chris@16 37 template<typename Fun, typename Cont>
Chris@16 38 struct expand_pattern<BOOST_PP_INC(N), Fun, Cont>
Chris@16 39 : Cont::template cat<BOOST_PP_ENUM(BOOST_PP_INC(N), M0, ~)>
Chris@16 40 {
Chris@16 41 BOOST_MPL_ASSERT_MSG(
Chris@16 42 (expand_pattern_helper<proto::_child_c<0>, Fun>::applied::value)
Chris@16 43 , NO_PACK_EXPRESSION_FOUND_IN_UNPACKING_PATTERN
Chris@16 44 , (Fun)
Chris@16 45 );
Chris@16 46 };
Chris@16 47
Chris@16 48 template<typename Ret BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
Chris@16 49 struct BOOST_PP_CAT(expand_pattern_rest_, N)
Chris@16 50 {
Chris@16 51 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(BOOST_PP_INC(M), typename C, void)>
Chris@16 52 struct cat;
Chris@16 53
Chris@16 54 #define BOOST_PP_ITERATION_PARAMS_2 \
Chris@16 55 (3, (1, M, <boost/proto/transform/detail/pack_impl.hpp>))
Chris@16 56 #include BOOST_PP_ITERATE()
Chris@16 57 };
Chris@16 58 #undef M0
Chris@16 59 #undef M
Chris@16 60 #undef N
Chris@16 61 #else
Chris@16 62 #define I BOOST_PP_ITERATION()
Chris@16 63 #define J BOOST_PP_RELATIVE_ITERATION(1)
Chris@16 64 template<BOOST_PP_ENUM_PARAMS(I, typename C)>
Chris@16 65 struct cat<BOOST_PP_ENUM_PARAMS(I, C)>
Chris@16 66 {
Chris@16 67 typedef msvc_fun_workaround<Ret(BOOST_PP_ENUM_PARAMS(J, A) BOOST_PP_COMMA_IF(J) BOOST_PP_ENUM_PARAMS(I, C))> type;
Chris@16 68 };
Chris@16 69 #undef J
Chris@16 70 #undef I
Chris@16 71 #endif
Chris@16 72 #endif