Chris@16: #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif !defined(BOOST_PP_IS_ITERATING) Chris@16: Chris@16: /// INTERNAL ONLY Chris@16: /// Chris@16: #define BOOST_PROTO_DEFINE_CHILD_N(Z, N, DATA) \ Chris@16: typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(child, N); \ Chris@16: /**< INTERNAL ONLY */ Chris@16: Chris@16: /// INTERNAL ONLY Chris@16: /// Chris@16: #define BOOST_PROTO_DEFINE_VOID_N(z, n, data) \ Chris@16: typedef mpl::void_ BOOST_PP_CAT(child, n); \ Chris@16: /**< INTERNAL ONLY */ Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 2, line: 0, output: "preprocessed/args.hpp") Chris@16: #endif Chris@16: Chris@16: /////////////////////////////////////////////////////////////////////////////// Chris@16: /// \file args.hpp Chris@16: /// Contains definition of \c term\<\>, \c list1\<\>, \c list2\<\>, ... Chris@16: /// class templates. Chris@16: // Chris@16: // Copyright 2008 Eric Niebler. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(preserve: 1) Chris@16: #endif Chris@16: Chris@16: /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template. Chris@16: /// Chris@16: /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template. Chris@16: /// The types in the sequence correspond to the children of a node in an expression tree. Chris@16: template< typename Arg0 > Chris@16: struct term Chris@16: { Chris@16: static const long arity = 0; Chris@16: typedef Arg0 child0; Chris@16: BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~) Chris@16: Chris@16: /// INTERNAL ONLY Chris@16: /// Chris@16: typedef Arg0 back_; Chris@16: }; Chris@16: Chris@16: #define BOOST_PP_ITERATION_PARAMS_1 \ Chris@16: (3, (1, BOOST_PROTO_MAX_ARITY, )) Chris@16: #include BOOST_PP_ITERATE() Chris@16: Chris@16: #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) Chris@16: #pragma wave option(output: null) Chris@16: #endif Chris@16: Chris@16: #undef BOOST_PROTO_DEFINE_VOID_N Chris@16: #undef BOOST_PROTO_DEFINE_CHILD_N Chris@16: Chris@16: #else Chris@16: Chris@16: #define N BOOST_PP_ITERATION() Chris@16: Chris@16: /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template. Chris@16: /// Chris@16: /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template. Chris@16: /// The types in the sequence correspond to the children of a node in an expression tree. Chris@16: template< BOOST_PP_ENUM_PARAMS(N, typename Arg) > Chris@16: struct BOOST_PP_CAT(list, N) Chris@16: { Chris@16: static const long arity = N; Chris@16: BOOST_PP_REPEAT(N, BOOST_PROTO_DEFINE_CHILD_N, ~) Chris@16: BOOST_PP_REPEAT_FROM_TO(N, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~) Chris@16: Chris@16: /// INTERNAL ONLY Chris@16: /// Chris@16: typedef BOOST_PP_CAT(Arg, BOOST_PP_DEC(N)) back_; Chris@16: }; Chris@16: Chris@16: #undef N Chris@16: Chris@16: #endif