Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002 
0003     #include <boost/proto/detail/preprocessed/args.hpp>
0004 
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006 
0007     /// INTERNAL ONLY
0008     ///
0009     #define BOOST_PROTO_DEFINE_CHILD_N(Z, N, DATA)                                              \
0010         typedef BOOST_PP_CAT(Arg, N) BOOST_PP_CAT(child, N);                                    \
0011         /**< INTERNAL ONLY */
0012 
0013     /// INTERNAL ONLY
0014     ///
0015     #define BOOST_PROTO_DEFINE_VOID_N(z, n, data)                                               \
0016         typedef mpl::void_ BOOST_PP_CAT(child, n);                                              \
0017         /**< INTERNAL ONLY */
0018 
0019     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0020         #pragma wave option(preserve: 2, line: 0, output: "preprocessed/args.hpp")
0021     #endif
0022 
0023     ///////////////////////////////////////////////////////////////////////////////
0024     /// \file args.hpp
0025     /// Contains definition of \c term\<\>, \c list1\<\>, \c list2\<\>, ...
0026     /// class templates.
0027     //
0028     //  Copyright 2008 Eric Niebler. Distributed under the Boost
0029     //  Software License, Version 1.0. (See accompanying file
0030     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0031 
0032     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0033         #pragma wave option(preserve: 1)
0034     #endif
0035 
0036     /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
0037     ///
0038     /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
0039     /// The types in the sequence correspond to the children of a node in an expression tree.
0040     template< typename Arg0 >
0041     struct term
0042     {
0043         static const long arity = 0;
0044         typedef Arg0 child0;
0045         BOOST_PP_REPEAT_FROM_TO(1, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
0046 
0047         /// INTERNAL ONLY
0048         ///
0049         typedef Arg0 back_;
0050     };
0051 
0052     #define BOOST_PP_ITERATION_PARAMS_1                                                         \
0053         (3, (1, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/args.hpp>))
0054     #include BOOST_PP_ITERATE()
0055 
0056     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0057         #pragma wave option(output: null)
0058     #endif
0059 
0060     #undef BOOST_PROTO_DEFINE_VOID_N
0061     #undef BOOST_PROTO_DEFINE_CHILD_N
0062 
0063 #else
0064 
0065     #define N BOOST_PP_ITERATION()
0066 
0067     /// \brief A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
0068     ///
0069     /// A type sequence, for use as the 2nd parameter to the \c expr\<\> class template.
0070     /// The types in the sequence correspond to the children of a node in an expression tree.
0071     template< BOOST_PP_ENUM_PARAMS(N, typename Arg) >
0072     struct BOOST_PP_CAT(list, N)
0073     {
0074         static const long arity = N;
0075         BOOST_PP_REPEAT(N, BOOST_PROTO_DEFINE_CHILD_N, ~)
0076         BOOST_PP_REPEAT_FROM_TO(N, BOOST_PROTO_MAX_ARITY, BOOST_PROTO_DEFINE_VOID_N, ~)
0077 
0078         /// INTERNAL ONLY
0079         ///
0080         typedef BOOST_PP_CAT(Arg, BOOST_PP_DEC(N)) back_;
0081     };
0082 
0083     #undef N
0084 
0085 #endif