1 #if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
3 #include <boost/proto/detail/preprocessed/or_n.hpp>
5 #elif !defined(BOOST_PP_IS_ITERATING)
7 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
8 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/or_n.hpp")
11 ///////////////////////////////////////////////////////////////////////////////
13 /// Definitions of or_N
15 // Copyright 2008 Eric Niebler. Distributed under the Boost
16 // Software License, Version 1.0. (See accompanying file
17 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
19 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
20 #pragma wave option(preserve: 1)
23 #define BOOST_PP_ITERATION_PARAMS_1 \
24 (3, (2, BOOST_PROTO_MAX_LOGICAL_ARITY, <boost/proto/detail/or_n.hpp>))
25 #include BOOST_PP_ITERATE()
27 #if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
28 #pragma wave option(output: null)
31 #else // BOOST_PP_IS_ITERATING
33 #define N BOOST_PP_ITERATION()
35 template<bool B, typename Expr, typename BasicExpr, BOOST_PP_ENUM_PARAMS(N, typename G)>
36 struct BOOST_PP_CAT(or_, N)
38 : mpl::bool_<matches_<Expr, BasicExpr, typename G1::proto_grammar>::value>
43 : BOOST_PP_CAT(or_, BOOST_PP_DEC(N))<
44 matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
45 , Expr, BasicExpr, BOOST_PP_ENUM_SHIFTED_PARAMS(N, G)
50 template<typename Expr, typename BasicExpr BOOST_PP_ENUM_TRAILING_PARAMS(N, typename G)>
51 struct BOOST_PP_CAT(or_, N)<true, Expr, BasicExpr, BOOST_PP_ENUM_PARAMS(N, G)>