Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
0002 
0003     #include <boost/proto/detail/preprocessed/matches_.hpp>
0004 
0005 #elif !defined(BOOST_PP_IS_ITERATING)
0006 
0007     #define BOOST_PROTO_MATCHES_N_FUN(Z, N, DATA)                                                   \
0008         matches_<                                                                                   \
0009             typename detail::expr_traits<typename Args1::BOOST_PP_CAT(child, N)>::value_type::proto_derived_expr \
0010           , typename detail::expr_traits<typename Args1::BOOST_PP_CAT(child, N)>::value_type::proto_grammar \
0011           , typename Args2::BOOST_PP_CAT(child, N)::proto_grammar                                   \
0012         >
0013 
0014     #define BOOST_PROTO_DEFINE_MATCHES(Z, N, DATA)                                                  \
0015         matches_<                                                                                   \
0016             Expr                                                                                    \
0017           , BasicExpr                                                                               \
0018           , typename BOOST_PP_CAT(G, N)::proto_grammar                                              \
0019         >
0020 
0021     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0022         #pragma wave option(preserve: 2, line: 0, output: "preprocessed/matches_.hpp")
0023     #endif
0024 
0025     ///////////////////////////////////////////////////////////////////////////////
0026     /// \file matches_.hpp
0027     /// Definitions of matches_ specializations
0028     //
0029     //  Copyright 2008 Eric Niebler. Distributed under the Boost
0030     //  Software License, Version 1.0. (See accompanying file
0031     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0032 
0033     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0034         #pragma wave option(preserve: 1)
0035     #endif
0036 
0037     #define BOOST_PP_ITERATION_PARAMS_1                                                             \
0038         (3, (2, BOOST_PP_MAX(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_MAX_LOGICAL_ARITY), <boost/proto/detail/matches_.hpp>))
0039     #include BOOST_PP_ITERATE()
0040 
0041     #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
0042         #pragma wave option(output: null)
0043     #endif
0044 
0045     #undef BOOST_PROTO_DEFINE_MATCHES
0046     #undef BOOST_PROTO_MATCHES_N_FUN
0047 
0048 #else // BOOST_PP_IS_ITERATING
0049 
0050     #define N BOOST_PP_ITERATION()
0051 
0052     #if N <= BOOST_PROTO_MAX_LOGICAL_ARITY
0053 
0054         // handle proto::or_
0055         template<typename Expr, typename BasicExpr BOOST_PP_ENUM_TRAILING_PARAMS(N, typename G)>
0056         struct matches_<Expr, BasicExpr, proto::or_<BOOST_PP_ENUM_PARAMS(N, G)> >
0057           : BOOST_PP_CAT(or_, N)<
0058                 matches_<Expr, BasicExpr, typename G0::proto_grammar>::value,
0059                 Expr, BasicExpr BOOST_PP_ENUM_TRAILING_PARAMS(N, G)
0060             >
0061         {};
0062 
0063         // handle proto::and_
0064         template<typename Expr, typename BasicExpr, BOOST_PP_ENUM_PARAMS(N, typename G)>
0065         struct matches_<Expr, BasicExpr, proto::and_<BOOST_PP_ENUM_PARAMS(N, G)> >
0066           : detail::BOOST_PP_CAT(and_, N)<
0067                 BOOST_PROTO_DEFINE_MATCHES(~, 0, ~)::value,
0068                 BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFINE_MATCHES, ~)
0069             >
0070         {};
0071 
0072     #endif
0073 
0074     #if N <= BOOST_PROTO_MAX_ARITY
0075 
0076         template<typename Expr, typename Tag, typename Args1, typename Args2>
0077         struct matches_< Expr, proto::basic_expr<Tag, Args1, N>, proto::basic_expr<Tag, Args2, N> >
0078           : BOOST_PP_CAT(and_, N)<
0079                 BOOST_PROTO_MATCHES_N_FUN(~, 0, ~)::value,
0080                 BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_MATCHES_N_FUN, ~)
0081             >
0082         {};
0083 
0084         template<typename Expr, typename Tag, typename Args1, typename Args2>
0085         struct matches_< Expr, proto::basic_expr<Tag, Args1, N>, proto::basic_expr<proto::_, Args2, N> >
0086           : BOOST_PP_CAT(and_, N)<
0087                 BOOST_PROTO_MATCHES_N_FUN(~, 0, ~)::value,
0088                 BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_MATCHES_N_FUN, ~)
0089             >
0090         {};
0091 
0092     #endif
0093 
0094     #undef N
0095 
0096 #endif