dec.hpp 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. # /* Copyright (C) 2001
  2. # * Housemarque Oy
  3. # * http://www.housemarque.com
  4. # *
  5. # * Distributed under the Boost Software License, Version 1.0. (See
  6. # * accompanying file LICENSE_1_0.txt or copy at
  7. # * http://www.boost.org/LICENSE_1_0.txt)
  8. # */
  9. #
  10. # /* Revised by Paul Mensonides (2002) */
  11. # /* Revised by Edward Diener (2020) */
  12. #
  13. # /* See http://www.boost.org for most recent version. */
  14. #
  15. # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP
  16. # define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP
  17. #
  18. # include <boost/preprocessor/config/config.hpp>
  19. #
  20. # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT()
  21. #
  22. # /* BOOST_PP_DEC */
  23. #
  24. # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
  25. # define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x)
  26. # else
  27. # define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x))
  28. # define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par
  29. # endif
  30. #
  31. # define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x
  32. #
  33. # define BOOST_PP_DEC_0 0
  34. # define BOOST_PP_DEC_1 0
  35. # define BOOST_PP_DEC_2 1
  36. # define BOOST_PP_DEC_3 2
  37. # define BOOST_PP_DEC_4 3
  38. # define BOOST_PP_DEC_5 4
  39. # define BOOST_PP_DEC_6 5
  40. # define BOOST_PP_DEC_7 6
  41. # define BOOST_PP_DEC_8 7
  42. # define BOOST_PP_DEC_9 8
  43. # define BOOST_PP_DEC_10 9
  44. # define BOOST_PP_DEC_11 10
  45. # define BOOST_PP_DEC_12 11
  46. # define BOOST_PP_DEC_13 12
  47. # define BOOST_PP_DEC_14 13
  48. # define BOOST_PP_DEC_15 14
  49. # define BOOST_PP_DEC_16 15
  50. # define BOOST_PP_DEC_17 16
  51. # define BOOST_PP_DEC_18 17
  52. # define BOOST_PP_DEC_19 18
  53. # define BOOST_PP_DEC_20 19
  54. # define BOOST_PP_DEC_21 20
  55. # define BOOST_PP_DEC_22 21
  56. # define BOOST_PP_DEC_23 22
  57. # define BOOST_PP_DEC_24 23
  58. # define BOOST_PP_DEC_25 24
  59. # define BOOST_PP_DEC_26 25
  60. # define BOOST_PP_DEC_27 26
  61. # define BOOST_PP_DEC_28 27
  62. # define BOOST_PP_DEC_29 28
  63. # define BOOST_PP_DEC_30 29
  64. # define BOOST_PP_DEC_31 30
  65. # define BOOST_PP_DEC_32 31
  66. # define BOOST_PP_DEC_33 32
  67. # define BOOST_PP_DEC_34 33
  68. # define BOOST_PP_DEC_35 34
  69. # define BOOST_PP_DEC_36 35
  70. # define BOOST_PP_DEC_37 36
  71. # define BOOST_PP_DEC_38 37
  72. # define BOOST_PP_DEC_39 38
  73. # define BOOST_PP_DEC_40 39
  74. # define BOOST_PP_DEC_41 40
  75. # define BOOST_PP_DEC_42 41
  76. # define BOOST_PP_DEC_43 42
  77. # define BOOST_PP_DEC_44 43
  78. # define BOOST_PP_DEC_45 44
  79. # define BOOST_PP_DEC_46 45
  80. # define BOOST_PP_DEC_47 46
  81. # define BOOST_PP_DEC_48 47
  82. # define BOOST_PP_DEC_49 48
  83. # define BOOST_PP_DEC_50 49
  84. # define BOOST_PP_DEC_51 50
  85. # define BOOST_PP_DEC_52 51
  86. # define BOOST_PP_DEC_53 52
  87. # define BOOST_PP_DEC_54 53
  88. # define BOOST_PP_DEC_55 54
  89. # define BOOST_PP_DEC_56 55
  90. # define BOOST_PP_DEC_57 56
  91. # define BOOST_PP_DEC_58 57
  92. # define BOOST_PP_DEC_59 58
  93. # define BOOST_PP_DEC_60 59
  94. # define BOOST_PP_DEC_61 60
  95. # define BOOST_PP_DEC_62 61
  96. # define BOOST_PP_DEC_63 62
  97. # define BOOST_PP_DEC_64 63
  98. # define BOOST_PP_DEC_65 64
  99. # define BOOST_PP_DEC_66 65
  100. # define BOOST_PP_DEC_67 66
  101. # define BOOST_PP_DEC_68 67
  102. # define BOOST_PP_DEC_69 68
  103. # define BOOST_PP_DEC_70 69
  104. # define BOOST_PP_DEC_71 70
  105. # define BOOST_PP_DEC_72 71
  106. # define BOOST_PP_DEC_73 72
  107. # define BOOST_PP_DEC_74 73
  108. # define BOOST_PP_DEC_75 74
  109. # define BOOST_PP_DEC_76 75
  110. # define BOOST_PP_DEC_77 76
  111. # define BOOST_PP_DEC_78 77
  112. # define BOOST_PP_DEC_79 78
  113. # define BOOST_PP_DEC_80 79
  114. # define BOOST_PP_DEC_81 80
  115. # define BOOST_PP_DEC_82 81
  116. # define BOOST_PP_DEC_83 82
  117. # define BOOST_PP_DEC_84 83
  118. # define BOOST_PP_DEC_85 84
  119. # define BOOST_PP_DEC_86 85
  120. # define BOOST_PP_DEC_87 86
  121. # define BOOST_PP_DEC_88 87
  122. # define BOOST_PP_DEC_89 88
  123. # define BOOST_PP_DEC_90 89
  124. # define BOOST_PP_DEC_91 90
  125. # define BOOST_PP_DEC_92 91
  126. # define BOOST_PP_DEC_93 92
  127. # define BOOST_PP_DEC_94 93
  128. # define BOOST_PP_DEC_95 94
  129. # define BOOST_PP_DEC_96 95
  130. # define BOOST_PP_DEC_97 96
  131. # define BOOST_PP_DEC_98 97
  132. # define BOOST_PP_DEC_99 98
  133. # define BOOST_PP_DEC_100 99
  134. # define BOOST_PP_DEC_101 100
  135. # define BOOST_PP_DEC_102 101
  136. # define BOOST_PP_DEC_103 102
  137. # define BOOST_PP_DEC_104 103
  138. # define BOOST_PP_DEC_105 104
  139. # define BOOST_PP_DEC_106 105
  140. # define BOOST_PP_DEC_107 106
  141. # define BOOST_PP_DEC_108 107
  142. # define BOOST_PP_DEC_109 108
  143. # define BOOST_PP_DEC_110 109
  144. # define BOOST_PP_DEC_111 110
  145. # define BOOST_PP_DEC_112 111
  146. # define BOOST_PP_DEC_113 112
  147. # define BOOST_PP_DEC_114 113
  148. # define BOOST_PP_DEC_115 114
  149. # define BOOST_PP_DEC_116 115
  150. # define BOOST_PP_DEC_117 116
  151. # define BOOST_PP_DEC_118 117
  152. # define BOOST_PP_DEC_119 118
  153. # define BOOST_PP_DEC_120 119
  154. # define BOOST_PP_DEC_121 120
  155. # define BOOST_PP_DEC_122 121
  156. # define BOOST_PP_DEC_123 122
  157. # define BOOST_PP_DEC_124 123
  158. # define BOOST_PP_DEC_125 124
  159. # define BOOST_PP_DEC_126 125
  160. # define BOOST_PP_DEC_127 126
  161. # define BOOST_PP_DEC_128 127
  162. # define BOOST_PP_DEC_129 128
  163. # define BOOST_PP_DEC_130 129
  164. # define BOOST_PP_DEC_131 130
  165. # define BOOST_PP_DEC_132 131
  166. # define BOOST_PP_DEC_133 132
  167. # define BOOST_PP_DEC_134 133
  168. # define BOOST_PP_DEC_135 134
  169. # define BOOST_PP_DEC_136 135
  170. # define BOOST_PP_DEC_137 136
  171. # define BOOST_PP_DEC_138 137
  172. # define BOOST_PP_DEC_139 138
  173. # define BOOST_PP_DEC_140 139
  174. # define BOOST_PP_DEC_141 140
  175. # define BOOST_PP_DEC_142 141
  176. # define BOOST_PP_DEC_143 142
  177. # define BOOST_PP_DEC_144 143
  178. # define BOOST_PP_DEC_145 144
  179. # define BOOST_PP_DEC_146 145
  180. # define BOOST_PP_DEC_147 146
  181. # define BOOST_PP_DEC_148 147
  182. # define BOOST_PP_DEC_149 148
  183. # define BOOST_PP_DEC_150 149
  184. # define BOOST_PP_DEC_151 150
  185. # define BOOST_PP_DEC_152 151
  186. # define BOOST_PP_DEC_153 152
  187. # define BOOST_PP_DEC_154 153
  188. # define BOOST_PP_DEC_155 154
  189. # define BOOST_PP_DEC_156 155
  190. # define BOOST_PP_DEC_157 156
  191. # define BOOST_PP_DEC_158 157
  192. # define BOOST_PP_DEC_159 158
  193. # define BOOST_PP_DEC_160 159
  194. # define BOOST_PP_DEC_161 160
  195. # define BOOST_PP_DEC_162 161
  196. # define BOOST_PP_DEC_163 162
  197. # define BOOST_PP_DEC_164 163
  198. # define BOOST_PP_DEC_165 164
  199. # define BOOST_PP_DEC_166 165
  200. # define BOOST_PP_DEC_167 166
  201. # define BOOST_PP_DEC_168 167
  202. # define BOOST_PP_DEC_169 168
  203. # define BOOST_PP_DEC_170 169
  204. # define BOOST_PP_DEC_171 170
  205. # define BOOST_PP_DEC_172 171
  206. # define BOOST_PP_DEC_173 172
  207. # define BOOST_PP_DEC_174 173
  208. # define BOOST_PP_DEC_175 174
  209. # define BOOST_PP_DEC_176 175
  210. # define BOOST_PP_DEC_177 176
  211. # define BOOST_PP_DEC_178 177
  212. # define BOOST_PP_DEC_179 178
  213. # define BOOST_PP_DEC_180 179
  214. # define BOOST_PP_DEC_181 180
  215. # define BOOST_PP_DEC_182 181
  216. # define BOOST_PP_DEC_183 182
  217. # define BOOST_PP_DEC_184 183
  218. # define BOOST_PP_DEC_185 184
  219. # define BOOST_PP_DEC_186 185
  220. # define BOOST_PP_DEC_187 186
  221. # define BOOST_PP_DEC_188 187
  222. # define BOOST_PP_DEC_189 188
  223. # define BOOST_PP_DEC_190 189
  224. # define BOOST_PP_DEC_191 190
  225. # define BOOST_PP_DEC_192 191
  226. # define BOOST_PP_DEC_193 192
  227. # define BOOST_PP_DEC_194 193
  228. # define BOOST_PP_DEC_195 194
  229. # define BOOST_PP_DEC_196 195
  230. # define BOOST_PP_DEC_197 196
  231. # define BOOST_PP_DEC_198 197
  232. # define BOOST_PP_DEC_199 198
  233. # define BOOST_PP_DEC_200 199
  234. # define BOOST_PP_DEC_201 200
  235. # define BOOST_PP_DEC_202 201
  236. # define BOOST_PP_DEC_203 202
  237. # define BOOST_PP_DEC_204 203
  238. # define BOOST_PP_DEC_205 204
  239. # define BOOST_PP_DEC_206 205
  240. # define BOOST_PP_DEC_207 206
  241. # define BOOST_PP_DEC_208 207
  242. # define BOOST_PP_DEC_209 208
  243. # define BOOST_PP_DEC_210 209
  244. # define BOOST_PP_DEC_211 210
  245. # define BOOST_PP_DEC_212 211
  246. # define BOOST_PP_DEC_213 212
  247. # define BOOST_PP_DEC_214 213
  248. # define BOOST_PP_DEC_215 214
  249. # define BOOST_PP_DEC_216 215
  250. # define BOOST_PP_DEC_217 216
  251. # define BOOST_PP_DEC_218 217
  252. # define BOOST_PP_DEC_219 218
  253. # define BOOST_PP_DEC_220 219
  254. # define BOOST_PP_DEC_221 220
  255. # define BOOST_PP_DEC_222 221
  256. # define BOOST_PP_DEC_223 222
  257. # define BOOST_PP_DEC_224 223
  258. # define BOOST_PP_DEC_225 224
  259. # define BOOST_PP_DEC_226 225
  260. # define BOOST_PP_DEC_227 226
  261. # define BOOST_PP_DEC_228 227
  262. # define BOOST_PP_DEC_229 228
  263. # define BOOST_PP_DEC_230 229
  264. # define BOOST_PP_DEC_231 230
  265. # define BOOST_PP_DEC_232 231
  266. # define BOOST_PP_DEC_233 232
  267. # define BOOST_PP_DEC_234 233
  268. # define BOOST_PP_DEC_235 234
  269. # define BOOST_PP_DEC_236 235
  270. # define BOOST_PP_DEC_237 236
  271. # define BOOST_PP_DEC_238 237
  272. # define BOOST_PP_DEC_239 238
  273. # define BOOST_PP_DEC_240 239
  274. # define BOOST_PP_DEC_241 240
  275. # define BOOST_PP_DEC_242 241
  276. # define BOOST_PP_DEC_243 242
  277. # define BOOST_PP_DEC_244 243
  278. # define BOOST_PP_DEC_245 244
  279. # define BOOST_PP_DEC_246 245
  280. # define BOOST_PP_DEC_247 246
  281. # define BOOST_PP_DEC_248 247
  282. # define BOOST_PP_DEC_249 248
  283. # define BOOST_PP_DEC_250 249
  284. # define BOOST_PP_DEC_251 250
  285. # define BOOST_PP_DEC_252 251
  286. # define BOOST_PP_DEC_253 252
  287. # define BOOST_PP_DEC_254 253
  288. # define BOOST_PP_DEC_255 254
  289. # define BOOST_PP_DEC_256 255
  290. # define BOOST_PP_DEC_257 256
  291. #
  292. # else
  293. #
  294. # /* BOOST_PP_DEC */
  295. #
  296. # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
  297. # define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x)
  298. # else
  299. # define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x))
  300. # define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par
  301. # endif
  302. #
  303. # define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x
  304. #
  305. # include <boost/preprocessor/config/limits.hpp>
  306. #
  307. # if BOOST_PP_LIMIT_MAG == 256
  308. # include <boost/preprocessor/arithmetic/limits/dec_256.hpp>
  309. # elif BOOST_PP_LIMIT_MAG == 512
  310. # include <boost/preprocessor/arithmetic/limits/dec_256.hpp>
  311. # include <boost/preprocessor/arithmetic/limits/dec_512.hpp>
  312. # elif BOOST_PP_LIMIT_MAG == 1024
  313. # include <boost/preprocessor/arithmetic/limits/dec_256.hpp>
  314. # include <boost/preprocessor/arithmetic/limits/dec_512.hpp>
  315. # include <boost/preprocessor/arithmetic/limits/dec_1024.hpp>
  316. # else
  317. # error Incorrect value for the BOOST_PP_LIMIT_MAG limit
  318. # endif
  319. #
  320. # endif
  321. #
  322. # endif