1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES) 2 3 #include <boost/proto/detail/preprocessed/lambda_matches.hpp> 4 5 #elif !defined(BOOST_PP_IS_ITERATING) 6 7 #define BOOST_PROTO_DEFINE_LAMBDA_MATCHES(Z, N, DATA) \ 8 lambda_matches< \ 9 BOOST_PP_CAT(Expr, N) \ 10 , BOOST_PP_CAT(Grammar, N) \ 11 > 12 13 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) 14 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/lambda_matches.hpp") 15 #endif 16 17 /////////////////////////////////////////////////////////////////////////////// 18 /// \file lambda_matches.hpp 19 /// Specializations of the lambda_matches template 20 // 21 // Copyright 2008 Eric Niebler. Distributed under the Boost 22 // Software License, Version 1.0. (See accompanying file 23 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 24 25 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) 26 #pragma wave option(preserve: 1) 27 #endif 28 29 #define BOOST_PP_ITERATION_PARAMS_1 \ 30 (3, (2, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/lambda_matches.hpp>)) 31 #include BOOST_PP_ITERATE() 32 33 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES) 34 #pragma wave option(output: null) 35 #endif 36 37 #undef BOOST_PROTO_DEFINE_LAMBDA_MATCHES 38 39 #else // BOOST_PP_IS_ITERATING 40 41 #define N BOOST_PP_ITERATION() 42 43 template< 44 template<BOOST_PP_ENUM_PARAMS(N, typename BOOST_PP_INTERCEPT)> class T 45 BOOST_PP_ENUM_TRAILING_PARAMS(N, typename Expr) 46 BOOST_PP_ENUM_TRAILING_PARAMS(N, typename Grammar) 47 > 48 struct lambda_matches< 49 T<BOOST_PP_ENUM_PARAMS(N, Expr)> 50 , T<BOOST_PP_ENUM_PARAMS(N, Grammar)> 51 BOOST_PROTO_TEMPLATE_ARITY_PARAM(N) 52 > 53 : BOOST_PP_CAT(and_, N)< 54 BOOST_PROTO_DEFINE_LAMBDA_MATCHES(~, 0, ~)::value, 55 BOOST_PP_ENUM_SHIFTED(N, BOOST_PROTO_DEFINE_LAMBDA_MATCHES, ~) 56 > 57 {}; 58 59 #undef N 60 61 #endif 62