1     ///////////////////////////////////////////////////////////////////////////////
2     /// \file or_n.hpp
3     /// Definitions of or_N
4     //
5     //  Copyright 2008 Eric Niebler. Distributed under the Boost
6     //  Software License, Version 1.0. (See accompanying file
7     //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1>
9     struct or_2
10       : mpl::bool_<matches_<Expr, BasicExpr, typename G1::proto_grammar>::value>
11     {
12         typedef G1 which;
13     };
14     template<typename Expr, typename BasicExpr , typename G0 , typename G1>
15     struct or_2<true, Expr, BasicExpr, G0 , G1>
16       : mpl::true_
17     {
18         typedef G0 which;
19     };
20     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2>
21     struct or_3
22       : or_2<
23             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
24           , Expr, BasicExpr, G1 , G2
25         >
26     {};
27     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2>
28     struct or_3<true, Expr, BasicExpr, G0 , G1 , G2>
29       : mpl::true_
30     {
31         typedef G0 which;
32     };
33     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3>
34     struct or_4
35       : or_3<
36             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
37           , Expr, BasicExpr, G1 , G2 , G3
38         >
39     {};
40     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3>
41     struct or_4<true, Expr, BasicExpr, G0 , G1 , G2 , G3>
42       : mpl::true_
43     {
44         typedef G0 which;
45     };
46     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
47     struct or_5
48       : or_4<
49             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
50           , Expr, BasicExpr, G1 , G2 , G3 , G4
51         >
52     {};
53     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
54     struct or_5<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4>
55       : mpl::true_
56     {
57         typedef G0 which;
58     };
59     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
60     struct or_6
61       : or_5<
62             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
63           , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5
64         >
65     {};
66     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
67     struct or_6<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5>
68       : mpl::true_
69     {
70         typedef G0 which;
71     };
72     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
73     struct or_7
74       : or_6<
75             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
76           , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6
77         >
78     {};
79     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
80     struct or_7<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6>
81       : mpl::true_
82     {
83         typedef G0 which;
84     };
85     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
86     struct or_8
87       : or_7<
88             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
89           , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7
90         >
91     {};
92     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
93     struct or_8<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7>
94       : mpl::true_
95     {
96         typedef G0 which;
97     };
98     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
99     struct or_9
100       : or_8<
101             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
102           , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8
103         >
104     {};
105     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
106     struct or_9<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8>
107       : mpl::true_
108     {
109         typedef G0 which;
110     };
111     template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
112     struct or_10
113       : or_9<
114             matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
115           , Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9
116         >
117     {};
118     template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
119     struct or_10<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9>
120       : mpl::true_
121     {
122         typedef G0 which;
123     };
124