maybe_include.hpp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. // Boost.Function library
  2. // Copyright Douglas Gregor 2003. Use, modification and
  3. // distribution is subject to the Boost Software License, Version
  4. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. // For more information, see http://www.boost.org
  7. #if BOOST_FUNCTION_NUM_ARGS == 0
  8. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  9. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
  10. # ifndef BOOST_FUNCTION_0
  11. # define BOOST_FUNCTION_0
  12. # include <boost/function/function_template.hpp>
  13. # endif
  14. #elif BOOST_FUNCTION_NUM_ARGS == 1
  15. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  16. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 1
  17. # ifndef BOOST_FUNCTION_1
  18. # define BOOST_FUNCTION_1
  19. # include <boost/function/function_template.hpp>
  20. # endif
  21. #elif BOOST_FUNCTION_NUM_ARGS == 2
  22. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  23. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 2
  24. # ifndef BOOST_FUNCTION_2
  25. # define BOOST_FUNCTION_2
  26. # include <boost/function/function_template.hpp>
  27. # endif
  28. #elif BOOST_FUNCTION_NUM_ARGS == 3
  29. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  30. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 3
  31. # ifndef BOOST_FUNCTION_3
  32. # define BOOST_FUNCTION_3
  33. # include <boost/function/function_template.hpp>
  34. # endif
  35. #elif BOOST_FUNCTION_NUM_ARGS == 4
  36. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  37. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 4
  38. # ifndef BOOST_FUNCTION_4
  39. # define BOOST_FUNCTION_4
  40. # include <boost/function/function_template.hpp>
  41. # endif
  42. #elif BOOST_FUNCTION_NUM_ARGS == 5
  43. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  44. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 5
  45. # ifndef BOOST_FUNCTION_5
  46. # define BOOST_FUNCTION_5
  47. # include <boost/function/function_template.hpp>
  48. # endif
  49. #elif BOOST_FUNCTION_NUM_ARGS == 6
  50. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  51. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 6
  52. # ifndef BOOST_FUNCTION_6
  53. # define BOOST_FUNCTION_6
  54. # include <boost/function/function_template.hpp>
  55. # endif
  56. #elif BOOST_FUNCTION_NUM_ARGS == 7
  57. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  58. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 7
  59. # ifndef BOOST_FUNCTION_7
  60. # define BOOST_FUNCTION_7
  61. # include <boost/function/function_template.hpp>
  62. # endif
  63. #elif BOOST_FUNCTION_NUM_ARGS == 8
  64. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  65. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 8
  66. # ifndef BOOST_FUNCTION_8
  67. # define BOOST_FUNCTION_8
  68. # include <boost/function/function_template.hpp>
  69. # endif
  70. #elif BOOST_FUNCTION_NUM_ARGS == 9
  71. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  72. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 9
  73. # ifndef BOOST_FUNCTION_9
  74. # define BOOST_FUNCTION_9
  75. # include <boost/function/function_template.hpp>
  76. # endif
  77. #elif BOOST_FUNCTION_NUM_ARGS == 10
  78. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  79. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 10
  80. # ifndef BOOST_FUNCTION_10
  81. # define BOOST_FUNCTION_10
  82. # include <boost/function/function_template.hpp>
  83. # endif
  84. #elif BOOST_FUNCTION_NUM_ARGS == 11
  85. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  86. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 11
  87. # ifndef BOOST_FUNCTION_11
  88. # define BOOST_FUNCTION_11
  89. # include <boost/function/function_template.hpp>
  90. # endif
  91. #elif BOOST_FUNCTION_NUM_ARGS == 12
  92. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  93. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 12
  94. # ifndef BOOST_FUNCTION_12
  95. # define BOOST_FUNCTION_12
  96. # include <boost/function/function_template.hpp>
  97. # endif
  98. #elif BOOST_FUNCTION_NUM_ARGS == 13
  99. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  100. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 13
  101. # ifndef BOOST_FUNCTION_13
  102. # define BOOST_FUNCTION_13
  103. # include <boost/function/function_template.hpp>
  104. # endif
  105. #elif BOOST_FUNCTION_NUM_ARGS == 14
  106. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  107. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 14
  108. # ifndef BOOST_FUNCTION_14
  109. # define BOOST_FUNCTION_14
  110. # include <boost/function/function_template.hpp>
  111. # endif
  112. #elif BOOST_FUNCTION_NUM_ARGS == 15
  113. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  114. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 15
  115. # ifndef BOOST_FUNCTION_15
  116. # define BOOST_FUNCTION_15
  117. # include <boost/function/function_template.hpp>
  118. # endif
  119. #elif BOOST_FUNCTION_NUM_ARGS == 16
  120. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  121. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 16
  122. # ifndef BOOST_FUNCTION_16
  123. # define BOOST_FUNCTION_16
  124. # include <boost/function/function_template.hpp>
  125. # endif
  126. #elif BOOST_FUNCTION_NUM_ARGS == 17
  127. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  128. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 17
  129. # ifndef BOOST_FUNCTION_17
  130. # define BOOST_FUNCTION_17
  131. # include <boost/function/function_template.hpp>
  132. # endif
  133. #elif BOOST_FUNCTION_NUM_ARGS == 18
  134. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  135. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 18
  136. # ifndef BOOST_FUNCTION_18
  137. # define BOOST_FUNCTION_18
  138. # include <boost/function/function_template.hpp>
  139. # endif
  140. #elif BOOST_FUNCTION_NUM_ARGS == 19
  141. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  142. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 19
  143. # ifndef BOOST_FUNCTION_19
  144. # define BOOST_FUNCTION_19
  145. # include <boost/function/function_template.hpp>
  146. # endif
  147. #elif BOOST_FUNCTION_NUM_ARGS == 20
  148. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  149. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 20
  150. # ifndef BOOST_FUNCTION_20
  151. # define BOOST_FUNCTION_20
  152. # include <boost/function/function_template.hpp>
  153. # endif
  154. #elif BOOST_FUNCTION_NUM_ARGS == 21
  155. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  156. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 21
  157. # ifndef BOOST_FUNCTION_21
  158. # define BOOST_FUNCTION_21
  159. # include <boost/function/function_template.hpp>
  160. # endif
  161. #elif BOOST_FUNCTION_NUM_ARGS == 22
  162. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  163. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 22
  164. # ifndef BOOST_FUNCTION_22
  165. # define BOOST_FUNCTION_22
  166. # include <boost/function/function_template.hpp>
  167. # endif
  168. #elif BOOST_FUNCTION_NUM_ARGS == 23
  169. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  170. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 23
  171. # ifndef BOOST_FUNCTION_23
  172. # define BOOST_FUNCTION_23
  173. # include <boost/function/function_template.hpp>
  174. # endif
  175. #elif BOOST_FUNCTION_NUM_ARGS == 24
  176. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  177. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 24
  178. # ifndef BOOST_FUNCTION_24
  179. # define BOOST_FUNCTION_24
  180. # include <boost/function/function_template.hpp>
  181. # endif
  182. #elif BOOST_FUNCTION_NUM_ARGS == 25
  183. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  184. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 25
  185. # ifndef BOOST_FUNCTION_25
  186. # define BOOST_FUNCTION_25
  187. # include <boost/function/function_template.hpp>
  188. # endif
  189. #elif BOOST_FUNCTION_NUM_ARGS == 26
  190. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  191. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 26
  192. # ifndef BOOST_FUNCTION_26
  193. # define BOOST_FUNCTION_26
  194. # include <boost/function/function_template.hpp>
  195. # endif
  196. #elif BOOST_FUNCTION_NUM_ARGS == 27
  197. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  198. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 27
  199. # ifndef BOOST_FUNCTION_27
  200. # define BOOST_FUNCTION_27
  201. # include <boost/function/function_template.hpp>
  202. # endif
  203. #elif BOOST_FUNCTION_NUM_ARGS == 28
  204. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  205. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 28
  206. # ifndef BOOST_FUNCTION_28
  207. # define BOOST_FUNCTION_28
  208. # include <boost/function/function_template.hpp>
  209. # endif
  210. #elif BOOST_FUNCTION_NUM_ARGS == 29
  211. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  212. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 29
  213. # ifndef BOOST_FUNCTION_29
  214. # define BOOST_FUNCTION_29
  215. # include <boost/function/function_template.hpp>
  216. # endif
  217. #elif BOOST_FUNCTION_NUM_ARGS == 30
  218. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  219. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 30
  220. # ifndef BOOST_FUNCTION_30
  221. # define BOOST_FUNCTION_30
  222. # include <boost/function/function_template.hpp>
  223. # endif
  224. #elif BOOST_FUNCTION_NUM_ARGS == 31
  225. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  226. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 31
  227. # ifndef BOOST_FUNCTION_31
  228. # define BOOST_FUNCTION_31
  229. # include <boost/function/function_template.hpp>
  230. # endif
  231. #elif BOOST_FUNCTION_NUM_ARGS == 32
  232. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  233. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 32
  234. # ifndef BOOST_FUNCTION_32
  235. # define BOOST_FUNCTION_32
  236. # include <boost/function/function_template.hpp>
  237. # endif
  238. #elif BOOST_FUNCTION_NUM_ARGS == 33
  239. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  240. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 33
  241. # ifndef BOOST_FUNCTION_33
  242. # define BOOST_FUNCTION_33
  243. # include <boost/function/function_template.hpp>
  244. # endif
  245. #elif BOOST_FUNCTION_NUM_ARGS == 34
  246. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  247. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 34
  248. # ifndef BOOST_FUNCTION_34
  249. # define BOOST_FUNCTION_34
  250. # include <boost/function/function_template.hpp>
  251. # endif
  252. #elif BOOST_FUNCTION_NUM_ARGS == 35
  253. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  254. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 35
  255. # ifndef BOOST_FUNCTION_35
  256. # define BOOST_FUNCTION_35
  257. # include <boost/function/function_template.hpp>
  258. # endif
  259. #elif BOOST_FUNCTION_NUM_ARGS == 36
  260. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  261. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 36
  262. # ifndef BOOST_FUNCTION_36
  263. # define BOOST_FUNCTION_36
  264. # include <boost/function/function_template.hpp>
  265. # endif
  266. #elif BOOST_FUNCTION_NUM_ARGS == 37
  267. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  268. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 37
  269. # ifndef BOOST_FUNCTION_37
  270. # define BOOST_FUNCTION_37
  271. # include <boost/function/function_template.hpp>
  272. # endif
  273. #elif BOOST_FUNCTION_NUM_ARGS == 38
  274. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  275. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 38
  276. # ifndef BOOST_FUNCTION_38
  277. # define BOOST_FUNCTION_38
  278. # include <boost/function/function_template.hpp>
  279. # endif
  280. #elif BOOST_FUNCTION_NUM_ARGS == 39
  281. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  282. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 39
  283. # ifndef BOOST_FUNCTION_39
  284. # define BOOST_FUNCTION_39
  285. # include <boost/function/function_template.hpp>
  286. # endif
  287. #elif BOOST_FUNCTION_NUM_ARGS == 40
  288. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  289. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 40
  290. # ifndef BOOST_FUNCTION_40
  291. # define BOOST_FUNCTION_40
  292. # include <boost/function/function_template.hpp>
  293. # endif
  294. #elif BOOST_FUNCTION_NUM_ARGS == 41
  295. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  296. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 41
  297. # ifndef BOOST_FUNCTION_41
  298. # define BOOST_FUNCTION_41
  299. # include <boost/function/function_template.hpp>
  300. # endif
  301. #elif BOOST_FUNCTION_NUM_ARGS == 42
  302. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  303. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 42
  304. # ifndef BOOST_FUNCTION_42
  305. # define BOOST_FUNCTION_42
  306. # include <boost/function/function_template.hpp>
  307. # endif
  308. #elif BOOST_FUNCTION_NUM_ARGS == 43
  309. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  310. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 43
  311. # ifndef BOOST_FUNCTION_43
  312. # define BOOST_FUNCTION_43
  313. # include <boost/function/function_template.hpp>
  314. # endif
  315. #elif BOOST_FUNCTION_NUM_ARGS == 44
  316. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  317. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 44
  318. # ifndef BOOST_FUNCTION_44
  319. # define BOOST_FUNCTION_44
  320. # include <boost/function/function_template.hpp>
  321. # endif
  322. #elif BOOST_FUNCTION_NUM_ARGS == 45
  323. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  324. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 45
  325. # ifndef BOOST_FUNCTION_45
  326. # define BOOST_FUNCTION_45
  327. # include <boost/function/function_template.hpp>
  328. # endif
  329. #elif BOOST_FUNCTION_NUM_ARGS == 46
  330. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  331. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 46
  332. # ifndef BOOST_FUNCTION_46
  333. # define BOOST_FUNCTION_46
  334. # include <boost/function/function_template.hpp>
  335. # endif
  336. #elif BOOST_FUNCTION_NUM_ARGS == 47
  337. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  338. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 47
  339. # ifndef BOOST_FUNCTION_47
  340. # define BOOST_FUNCTION_47
  341. # include <boost/function/function_template.hpp>
  342. # endif
  343. #elif BOOST_FUNCTION_NUM_ARGS == 48
  344. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  345. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 48
  346. # ifndef BOOST_FUNCTION_48
  347. # define BOOST_FUNCTION_48
  348. # include <boost/function/function_template.hpp>
  349. # endif
  350. #elif BOOST_FUNCTION_NUM_ARGS == 49
  351. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  352. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 49
  353. # ifndef BOOST_FUNCTION_49
  354. # define BOOST_FUNCTION_49
  355. # include <boost/function/function_template.hpp>
  356. # endif
  357. #elif BOOST_FUNCTION_NUM_ARGS == 50
  358. # undef BOOST_FUNCTION_MAX_ARGS_DEFINED
  359. # define BOOST_FUNCTION_MAX_ARGS_DEFINED 50
  360. # ifndef BOOST_FUNCTION_50
  361. # define BOOST_FUNCTION_50
  362. # include <boost/function/function_template.hpp>
  363. # endif
  364. #else
  365. # error Cannot handle Boost.Function objects that accept more than 50 arguments!
  366. #endif