1 #ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP
2 #define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP
6 * http://www.housemarque.com
8 * Permission to copy, use, modify, sell and distribute this software is
9 * granted provided this copyright notice appears in all copies. This
10 * software is provided "as is" without express or implied warranty, and
11 * with no claim as to its suitability for any purpose.
13 * See http://www.boost.org for most recent version.
16 /** <p>Expands to <code>0</code> if <code>X == 0</code> and <code>1</code> if <code>X != 0</code>.</p>
18 <p><code>X</code> must be an integer literal in the range [0, BOOST_PP_LIMIT_MAG].</p>
20 <p>For example, <code>BOOST_PP_BOOL(3)</code> expands to <code>1</code>.</p>
22 #define BOOST_PP_BOOL(X) BOOST_PP_BOOL_DELAY(X)
24 /* BOOL can be implemented in O(1) tokens using saturated ADD & SUB.
25 * Unfortunately, it would result in significantly slower preprocessing.
27 #define BOOST_PP_BOOL_DELAY(X) BOOST_PP_BOOL##X
28 #define BOOST_PP_BOOL0 0
29 #define BOOST_PP_BOOL1 1
30 #define BOOST_PP_BOOL2 1
31 #define BOOST_PP_BOOL3 1
32 #define BOOST_PP_BOOL4 1
33 #define BOOST_PP_BOOL5 1
34 #define BOOST_PP_BOOL6 1
35 #define BOOST_PP_BOOL7 1
36 #define BOOST_PP_BOOL8 1
37 #define BOOST_PP_BOOL9 1
38 #define BOOST_PP_BOOL10 1
39 #define BOOST_PP_BOOL11 1
40 #define BOOST_PP_BOOL12 1
41 #define BOOST_PP_BOOL13 1
42 #define BOOST_PP_BOOL14 1
43 #define BOOST_PP_BOOL15 1
44 #define BOOST_PP_BOOL16 1
45 #define BOOST_PP_BOOL17 1
46 #define BOOST_PP_BOOL18 1
47 #define BOOST_PP_BOOL19 1
48 #define BOOST_PP_BOOL20 1
49 #define BOOST_PP_BOOL21 1
50 #define BOOST_PP_BOOL22 1
51 #define BOOST_PP_BOOL23 1
52 #define BOOST_PP_BOOL24 1
53 #define BOOST_PP_BOOL25 1
54 #define BOOST_PP_BOOL26 1
55 #define BOOST_PP_BOOL27 1
56 #define BOOST_PP_BOOL28 1
57 #define BOOST_PP_BOOL29 1
58 #define BOOST_PP_BOOL30 1
59 #define BOOST_PP_BOOL31 1
60 #define BOOST_PP_BOOL32 1
61 #define BOOST_PP_BOOL33 1
62 #define BOOST_PP_BOOL34 1
63 #define BOOST_PP_BOOL35 1
64 #define BOOST_PP_BOOL36 1
65 #define BOOST_PP_BOOL37 1
66 #define BOOST_PP_BOOL38 1
67 #define BOOST_PP_BOOL39 1
68 #define BOOST_PP_BOOL40 1
69 #define BOOST_PP_BOOL41 1
70 #define BOOST_PP_BOOL42 1
71 #define BOOST_PP_BOOL43 1
72 #define BOOST_PP_BOOL44 1
73 #define BOOST_PP_BOOL45 1
74 #define BOOST_PP_BOOL46 1
75 #define BOOST_PP_BOOL47 1
76 #define BOOST_PP_BOOL48 1
77 #define BOOST_PP_BOOL49 1
78 #define BOOST_PP_BOOL50 1
79 #define BOOST_PP_BOOL51 1
80 #define BOOST_PP_BOOL52 1
81 #define BOOST_PP_BOOL53 1
82 #define BOOST_PP_BOOL54 1
83 #define BOOST_PP_BOOL55 1
84 #define BOOST_PP_BOOL56 1
85 #define BOOST_PP_BOOL57 1
86 #define BOOST_PP_BOOL58 1
87 #define BOOST_PP_BOOL59 1
88 #define BOOST_PP_BOOL60 1
89 #define BOOST_PP_BOOL61 1
90 #define BOOST_PP_BOOL62 1
91 #define BOOST_PP_BOOL63 1
92 #define BOOST_PP_BOOL64 1
93 #define BOOST_PP_BOOL65 1
94 #define BOOST_PP_BOOL66 1
95 #define BOOST_PP_BOOL67 1
96 #define BOOST_PP_BOOL68 1
97 #define BOOST_PP_BOOL69 1
98 #define BOOST_PP_BOOL70 1
99 #define BOOST_PP_BOOL71 1
100 #define BOOST_PP_BOOL72 1
101 #define BOOST_PP_BOOL73 1
102 #define BOOST_PP_BOOL74 1
103 #define BOOST_PP_BOOL75 1
104 #define BOOST_PP_BOOL76 1
105 #define BOOST_PP_BOOL77 1
106 #define BOOST_PP_BOOL78 1
107 #define BOOST_PP_BOOL79 1
108 #define BOOST_PP_BOOL80 1
109 #define BOOST_PP_BOOL81 1
110 #define BOOST_PP_BOOL82 1
111 #define BOOST_PP_BOOL83 1
112 #define BOOST_PP_BOOL84 1
113 #define BOOST_PP_BOOL85 1
114 #define BOOST_PP_BOOL86 1
115 #define BOOST_PP_BOOL87 1
116 #define BOOST_PP_BOOL88 1
117 #define BOOST_PP_BOOL89 1
118 #define BOOST_PP_BOOL90 1
119 #define BOOST_PP_BOOL91 1
120 #define BOOST_PP_BOOL92 1
121 #define BOOST_PP_BOOL93 1
122 #define BOOST_PP_BOOL94 1
123 #define BOOST_PP_BOOL95 1
124 #define BOOST_PP_BOOL96 1
125 #define BOOST_PP_BOOL97 1
126 #define BOOST_PP_BOOL98 1
127 #define BOOST_PP_BOOL99 1
128 #define BOOST_PP_BOOL100 1
129 #define BOOST_PP_BOOL101 1
130 #define BOOST_PP_BOOL102 1
131 #define BOOST_PP_BOOL103 1
132 #define BOOST_PP_BOOL104 1
133 #define BOOST_PP_BOOL105 1
134 #define BOOST_PP_BOOL106 1
135 #define BOOST_PP_BOOL107 1
136 #define BOOST_PP_BOOL108 1
137 #define BOOST_PP_BOOL109 1
138 #define BOOST_PP_BOOL110 1
139 #define BOOST_PP_BOOL111 1
140 #define BOOST_PP_BOOL112 1
141 #define BOOST_PP_BOOL113 1
142 #define BOOST_PP_BOOL114 1
143 #define BOOST_PP_BOOL115 1
144 #define BOOST_PP_BOOL116 1
145 #define BOOST_PP_BOOL117 1
146 #define BOOST_PP_BOOL118 1
147 #define BOOST_PP_BOOL119 1
148 #define BOOST_PP_BOOL120 1
149 #define BOOST_PP_BOOL121 1
150 #define BOOST_PP_BOOL122 1
151 #define BOOST_PP_BOOL123 1
152 #define BOOST_PP_BOOL124 1
153 #define BOOST_PP_BOOL125 1
154 #define BOOST_PP_BOOL126 1
155 #define BOOST_PP_BOOL127 1
156 #define BOOST_PP_BOOL128 1
158 /* <p>Obsolete. Use BOOST_PP_BOOL().</p> */
159 #define BOOST_PREPROCESSOR_BOOL(X) BOOST_PP_BOOL(X)