bind_functions.hpp 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879
  1. // -- bind_functions.hpp -- Boost Lambda Library
  2. //
  3. // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
  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. // For more information, see http://www.boost.org
  10. // ----------------------------------------------------------------
  11. #ifndef BOOST_LAMBDA_BIND_FUNCTIONS_HPP
  12. #define BOOST_LAMBDA_BIND_FUNCTIONS_HPP
  13. namespace boost {
  14. namespace lambda {
  15. #ifdef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  16. // gcc 2.96 instantiates bind functions it does not even call.
  17. // These instantiations lead to incorrect types in the return type,
  18. // and a compilation error results.
  19. // This tweaking is to prevent the formation of the erroneous type.
  20. namespace detail {
  21. template<class T> struct constify_non_funcs {
  22. typedef typename
  23. detail::IF_type<boost::is_function<T>::value,
  24. boost::add_reference<T>,
  25. boost::add_const<T>
  26. >::type type;
  27. };
  28. }
  29. #endif
  30. // 1-argument bind functions --------------------------
  31. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  32. template <class Result>
  33. inline const
  34. lambda_functor<
  35. lambda_functor_base<
  36. action<1, function_action<1, Result> >,
  37. typename detail::bind_tuple_mapper<Result(&)()>::type
  38. >
  39. >
  40. bind(Result(& a1)()) {
  41. return
  42. lambda_functor_base<
  43. action<1, function_action<1, Result> >,
  44. typename detail::bind_tuple_mapper<Result(&)()>::type
  45. >
  46. ( typename detail::bind_tuple_mapper<Result(&)()>::type
  47. (a1)
  48. );
  49. }
  50. #endif
  51. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  52. template <class Arg1>
  53. inline const
  54. lambda_functor<
  55. lambda_functor_base<
  56. action<1, function_action<1> >,
  57. typename detail::bind_tuple_mapper<const Arg1>::type
  58. >
  59. >
  60. bind(const Arg1& a1) {
  61. return
  62. lambda_functor_base<
  63. action<1, function_action<1> >,
  64. typename detail::bind_tuple_mapper<const Arg1>::type
  65. >
  66. ( typename detail::bind_tuple_mapper<const Arg1>::type
  67. (a1)
  68. );
  69. }
  70. template <class Result, class Arg1>
  71. inline const
  72. lambda_functor<
  73. lambda_functor_base<
  74. action<1, function_action<1, Result> >,
  75. typename detail::bind_tuple_mapper<const Arg1>::type
  76. >
  77. >
  78. bind(const Arg1& a1) {
  79. return
  80. lambda_functor_base<
  81. action<1, function_action<1, Result> >,
  82. typename detail::bind_tuple_mapper<const Arg1>::type
  83. >
  84. ( typename detail::bind_tuple_mapper<const Arg1>::type
  85. (a1)
  86. );
  87. }
  88. #else
  89. template <class Arg1>
  90. inline const
  91. lambda_functor<
  92. lambda_functor_base<
  93. action<1, function_action<1> >,
  94. typename detail::bind_tuple_mapper<
  95. typename detail::constify_non_funcs<Arg1>::type
  96. >::type
  97. >
  98. >
  99. bind(const Arg1& a1) {
  100. return
  101. lambda_functor_base<
  102. action<1, function_action<1> >,
  103. typename detail::bind_tuple_mapper<
  104. typename detail::constify_non_funcs<Arg1>::type
  105. >::type
  106. >
  107. ( typename detail::bind_tuple_mapper<
  108. typename detail::constify_non_funcs<Arg1>::type
  109. >::type
  110. (a1)
  111. );
  112. }
  113. template <class Result, class Arg1>
  114. inline const
  115. lambda_functor<
  116. lambda_functor_base<
  117. action<1, function_action<1, Result> >,
  118. typename detail::bind_tuple_mapper<
  119. typename detail::constify_non_funcs<Arg1>::type
  120. >::type
  121. >
  122. >
  123. bind(const Arg1& a1) {
  124. return
  125. lambda_functor_base<
  126. action<1, function_action<1, Result> >,
  127. typename detail::bind_tuple_mapper<
  128. typename detail::constify_non_funcs<Arg1>::type
  129. >::type
  130. >
  131. ( typename detail::bind_tuple_mapper<
  132. typename detail::constify_non_funcs<Arg1>::type
  133. >::type
  134. (a1)
  135. );
  136. }
  137. template <class Result>
  138. inline const
  139. lambda_functor<
  140. lambda_functor_base<
  141. action<1, function_action<1, Result> >,
  142. typename detail::bind_tuple_mapper<Result(*)()>::type
  143. >
  144. >
  145. bind(Result(* const & a1)()) {
  146. return
  147. lambda_functor_base<
  148. action<1, function_action<1, Result> >,
  149. typename detail::bind_tuple_mapper<Result(*)()>::type
  150. >
  151. ( typename detail::bind_tuple_mapper<Result(*)()>::type
  152. (a1)
  153. );
  154. }
  155. #endif
  156. // 2-argument bind functions --------------------------
  157. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  158. template <class Result, class Par1, class Arg2>
  159. inline const
  160. lambda_functor<
  161. lambda_functor_base<
  162. action<2, function_action<2, Result> >,
  163. typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
  164. >
  165. >
  166. bind(Result(&a1)(Par1), const Arg2& a2) {
  167. return
  168. lambda_functor_base<
  169. action<2, function_action<2, Result> >,
  170. typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
  171. >
  172. ( typename detail::bind_tuple_mapper<Result(&)(Par1), const Arg2>::type
  173. (a1, a2)
  174. );
  175. }
  176. #endif
  177. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  178. template <class Arg1, class Arg2>
  179. inline const
  180. lambda_functor<
  181. lambda_functor_base<
  182. action<2, function_action<2> >,
  183. typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  184. >
  185. >
  186. bind(const Arg1& a1, const Arg2& a2) {
  187. return
  188. lambda_functor_base<
  189. action<2, function_action<2> >,
  190. typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  191. >
  192. ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  193. (a1, a2)
  194. );
  195. }
  196. template <class Result, class Arg1, class Arg2>
  197. inline const
  198. lambda_functor<
  199. lambda_functor_base<
  200. action<2, function_action<2, Result> >,
  201. typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  202. >
  203. >
  204. bind(const Arg1& a1, const Arg2& a2) {
  205. return
  206. lambda_functor_base<
  207. action<2, function_action<2, Result> >,
  208. typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  209. >
  210. ( typename detail::bind_tuple_mapper<const Arg1, const Arg2>::type
  211. (a1, a2)
  212. );
  213. }
  214. #else
  215. template <class Arg1, class Arg2>
  216. inline const
  217. lambda_functor<
  218. lambda_functor_base<
  219. action<2, function_action<2> >,
  220. typename detail::bind_tuple_mapper<
  221. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  222. >::type
  223. >
  224. >
  225. bind(const Arg1& a1, const Arg2& a2) {
  226. return
  227. lambda_functor_base<
  228. action<2, function_action<2> >,
  229. typename detail::bind_tuple_mapper<
  230. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  231. >::type
  232. >
  233. ( typename detail::bind_tuple_mapper<
  234. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  235. >::type
  236. (a1, a2)
  237. );
  238. }
  239. template <class Result, class Arg1, class Arg2>
  240. inline const
  241. lambda_functor<
  242. lambda_functor_base<
  243. action<2, function_action<2, Result> >,
  244. typename detail::bind_tuple_mapper<
  245. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  246. >::type
  247. >
  248. >
  249. bind(const Arg1& a1, const Arg2& a2) {
  250. return
  251. lambda_functor_base<
  252. action<2, function_action<2, Result> >,
  253. typename detail::bind_tuple_mapper<
  254. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  255. >::type
  256. >
  257. ( typename detail::bind_tuple_mapper<
  258. typename detail::constify_non_funcs<Arg1>::type, const Arg2
  259. >::type
  260. (a1, a2)
  261. );
  262. }
  263. template <class Result, class Par1, class Arg2>
  264. inline const
  265. lambda_functor<
  266. lambda_functor_base<
  267. action<2, function_action<2, Result> >,
  268. typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
  269. >
  270. >
  271. bind(Result(* const & a1)(Par1), const Arg2& a2) {
  272. return
  273. lambda_functor_base<
  274. action<2, function_action<2, Result> >,
  275. typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
  276. >
  277. ( typename detail::bind_tuple_mapper<Result(*)(Par1), const Arg2>::type
  278. (a1, a2)
  279. );
  280. }
  281. #endif
  282. // 3-argument bind functions --------------------------
  283. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  284. template <class Result, class Par1, class Par2, class Arg2, class Arg3>
  285. inline const
  286. lambda_functor<
  287. lambda_functor_base<
  288. action<3, function_action<3, Result> >,
  289. typename detail::bind_tuple_mapper<
  290. Result(&)(Par1, Par2), const Arg2, const Arg3
  291. >::type
  292. >
  293. >
  294. bind(Result(&a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) {
  295. return
  296. lambda_functor_base<
  297. action<3, function_action<3, Result> >,
  298. typename detail::bind_tuple_mapper<
  299. Result(&)(Par1, Par2), const Arg2, const Arg3
  300. >::type
  301. >
  302. ( typename detail::bind_tuple_mapper<
  303. Result(&)(Par1, Par2), const Arg2, const Arg3
  304. >::type
  305. (a1, a2, a3)
  306. );
  307. }
  308. #endif
  309. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  310. template <class Arg1, class Arg2, class Arg3>
  311. inline const
  312. lambda_functor<
  313. lambda_functor_base<
  314. action<3, function_action<3> >,
  315. typename detail::bind_tuple_mapper<
  316. const Arg1, const Arg2, const Arg3
  317. >::type
  318. >
  319. >
  320. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
  321. return
  322. lambda_functor_base<
  323. action<3, function_action<3> >,
  324. typename detail::bind_tuple_mapper<
  325. const Arg1, const Arg2, const Arg3
  326. >::type
  327. >
  328. ( typename detail::bind_tuple_mapper<
  329. const Arg1, const Arg2, const Arg3
  330. >::type
  331. (a1, a2, a3)
  332. );
  333. }
  334. template <class Result, class Arg1, class Arg2, class Arg3>
  335. inline const
  336. lambda_functor<
  337. lambda_functor_base<
  338. action<3, function_action<3, Result> >,
  339. typename detail::bind_tuple_mapper<
  340. const Arg1, const Arg2, const Arg3
  341. >::type
  342. >
  343. >
  344. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
  345. return
  346. lambda_functor_base<
  347. action<3, function_action<3, Result> >,
  348. typename detail::bind_tuple_mapper<
  349. const Arg1, const Arg2, const Arg3
  350. >::type
  351. >
  352. ( typename detail::bind_tuple_mapper<
  353. const Arg1, const Arg2, const Arg3
  354. >::type
  355. (a1, a2, a3)
  356. );
  357. }
  358. #else
  359. template <class Arg1, class Arg2, class Arg3>
  360. inline const
  361. lambda_functor<
  362. lambda_functor_base<
  363. action<3, function_action<3> >,
  364. typename detail::bind_tuple_mapper<
  365. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3
  366. >::type
  367. >
  368. >
  369. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
  370. return
  371. lambda_functor_base<
  372. action<3, function_action<3> >,
  373. typename detail::bind_tuple_mapper<
  374. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  375. const Arg3
  376. >::type
  377. >
  378. ( typename detail::bind_tuple_mapper<
  379. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  380. const Arg3
  381. >::type
  382. (a1, a2, a3)
  383. );
  384. }
  385. template <class Result, class Arg1, class Arg2, class Arg3>
  386. inline const
  387. lambda_functor<
  388. lambda_functor_base<
  389. action<3, function_action<3, Result> >,
  390. typename detail::bind_tuple_mapper<
  391. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3
  392. >::type
  393. >
  394. >
  395. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3) {
  396. return
  397. lambda_functor_base<
  398. action<3, function_action<3, Result> >,
  399. typename detail::bind_tuple_mapper<
  400. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  401. const Arg3
  402. >::type
  403. >
  404. ( typename detail::bind_tuple_mapper<
  405. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  406. const Arg3
  407. >::type
  408. (a1, a2, a3)
  409. );
  410. }
  411. template <class Result, class Par1, class Par2, class Arg2, class Arg3>
  412. inline const
  413. lambda_functor<
  414. lambda_functor_base<
  415. action<3, function_action<3, Result> >,
  416. typename detail::bind_tuple_mapper<
  417. Result(*)(Par1, Par2), const Arg2, const Arg3
  418. >::type
  419. >
  420. >
  421. bind(Result(* const & a1)(Par1, Par2), const Arg2& a2, const Arg3& a3) {
  422. return
  423. lambda_functor_base<
  424. action<3, function_action<3, Result> >,
  425. typename detail::bind_tuple_mapper<
  426. Result(*)(Par1, Par2), const Arg2, const Arg3
  427. >::type
  428. >
  429. ( typename detail::bind_tuple_mapper<
  430. Result(*)(Par1, Par2), const Arg2, const Arg3
  431. >::type
  432. (a1, a2, a3)
  433. );
  434. }
  435. #endif
  436. // 4-argument bind functions --------------------------
  437. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  438. template <class Result, class Par1, class Par2, class Par3, class Arg2,
  439. class Arg3, class Arg4>
  440. inline const
  441. lambda_functor<
  442. lambda_functor_base<
  443. action<4, function_action<4, Result> >,
  444. typename detail::bind_tuple_mapper<
  445. Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  446. >::type
  447. >
  448. >
  449. bind(Result(&a1)(Par1, Par2, Par3), const Arg2& a2, const Arg3& a3,
  450. const Arg4& a4) {
  451. return
  452. lambda_functor_base<
  453. action<4, function_action<4, Result> >,
  454. typename detail::bind_tuple_mapper<
  455. Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  456. >::type
  457. >
  458. ( typename detail::bind_tuple_mapper<
  459. Result(&)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  460. >::type
  461. (a1, a2, a3, a4)
  462. );
  463. }
  464. #endif
  465. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  466. template <class Arg1, class Arg2, class Arg3, class Arg4>
  467. inline const
  468. lambda_functor<
  469. lambda_functor_base<
  470. action<4, function_action<4> >,
  471. typename detail::bind_tuple_mapper<
  472. const Arg1, const Arg2, const Arg3, const Arg4
  473. >::type
  474. >
  475. >
  476. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
  477. return
  478. lambda_functor_base<
  479. action<4, function_action<4> >,
  480. typename detail::bind_tuple_mapper<
  481. const Arg1, const Arg2, const Arg3, const Arg4
  482. >::type
  483. >
  484. ( typename detail::bind_tuple_mapper<
  485. const Arg1, const Arg2, const Arg3, const Arg4
  486. >::type
  487. (a1, a2, a3, a4)
  488. );
  489. }
  490. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4>
  491. inline const
  492. lambda_functor<
  493. lambda_functor_base<
  494. action<4, function_action<4, Result> >,
  495. typename detail::bind_tuple_mapper<
  496. const Arg1, const Arg2, const Arg3, const Arg4
  497. >::type
  498. >
  499. >
  500. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
  501. return
  502. lambda_functor_base<
  503. action<4, function_action<4, Result> >,
  504. typename detail::bind_tuple_mapper<
  505. const Arg1, const Arg2, const Arg3, const Arg4
  506. >::type
  507. >
  508. ( typename detail::bind_tuple_mapper<
  509. const Arg1, const Arg2, const Arg3, const Arg4
  510. >::type
  511. (a1, a2, a3, a4)
  512. );
  513. }
  514. #else
  515. template <class Arg1, class Arg2, class Arg3, class Arg4>
  516. inline const
  517. lambda_functor<
  518. lambda_functor_base<
  519. action<4, function_action<4> >,
  520. typename detail::bind_tuple_mapper<
  521. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  522. const Arg4
  523. >::type
  524. >
  525. >
  526. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
  527. return
  528. lambda_functor_base<
  529. action<4, function_action<4> >,
  530. typename detail::bind_tuple_mapper<
  531. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  532. const Arg3, const Arg4
  533. >::type
  534. >
  535. ( typename detail::bind_tuple_mapper<
  536. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  537. const Arg3, const Arg4
  538. >::type
  539. (a1, a2, a3, a4)
  540. );
  541. }
  542. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4>
  543. inline const
  544. lambda_functor<
  545. lambda_functor_base<
  546. action<4, function_action<4, Result> >,
  547. typename detail::bind_tuple_mapper<
  548. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  549. const Arg4
  550. >::type
  551. >
  552. >
  553. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) {
  554. return
  555. lambda_functor_base<
  556. action<4, function_action<4, Result> >,
  557. typename detail::bind_tuple_mapper<
  558. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  559. const Arg3, const Arg4
  560. >::type
  561. >
  562. ( typename detail::bind_tuple_mapper<
  563. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  564. const Arg3, const Arg4
  565. >::type
  566. (a1, a2, a3, a4)
  567. );
  568. }
  569. template <class Result, class Par1, class Par2, class Par3, class Arg2,
  570. class Arg3, class Arg4>
  571. inline const
  572. lambda_functor<
  573. lambda_functor_base<
  574. action<4, function_action<4, Result> >,
  575. typename detail::bind_tuple_mapper<
  576. Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  577. >::type
  578. >
  579. >
  580. bind(Result(* const & a1)(Par1, Par2, Par3), const Arg2& a2,
  581. const Arg3& a3, const Arg4& a4) {
  582. return
  583. lambda_functor_base<
  584. action<4, function_action<4, Result> >,
  585. typename detail::bind_tuple_mapper<
  586. Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  587. >::type
  588. >
  589. ( typename detail::bind_tuple_mapper<
  590. Result(*)(Par1, Par2, Par3), const Arg2, const Arg3, const Arg4
  591. >::type
  592. (a1, a2, a3, a4)
  593. );
  594. }
  595. #endif
  596. // 5-argument bind functions --------------------------
  597. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  598. template <class Result, class Par1, class Par2, class Par3, class Par4,
  599. class Arg2, class Arg3, class Arg4, class Arg5>
  600. inline const
  601. lambda_functor<
  602. lambda_functor_base<
  603. action<5, function_action<5, Result> >,
  604. typename detail::bind_tuple_mapper<
  605. Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  606. const Arg5
  607. >::type
  608. >
  609. >
  610. bind(Result(&a1)(Par1, Par2, Par3, Par4), const Arg2& a2, const Arg3& a3,
  611. const Arg4& a4, const Arg5& a5) {
  612. return
  613. lambda_functor_base<
  614. action<5, function_action<5, Result> >,
  615. typename detail::bind_tuple_mapper<
  616. Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  617. const Arg5
  618. >::type
  619. >
  620. ( typename detail::bind_tuple_mapper<
  621. Result(&)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  622. const Arg5
  623. >::type
  624. (a1, a2, a3, a4, a5)
  625. );
  626. }
  627. #endif
  628. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  629. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
  630. inline const
  631. lambda_functor<
  632. lambda_functor_base<
  633. action<5, function_action<5> >,
  634. typename detail::bind_tuple_mapper<
  635. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  636. >::type
  637. >
  638. >
  639. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  640. const Arg5& a5) {
  641. return
  642. lambda_functor_base<
  643. action<5, function_action<5> >,
  644. typename detail::bind_tuple_mapper<
  645. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  646. >::type
  647. >
  648. ( typename detail::bind_tuple_mapper<
  649. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  650. >::type
  651. (a1, a2, a3, a4, a5)
  652. );
  653. }
  654. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  655. class Arg5>
  656. inline const
  657. lambda_functor<
  658. lambda_functor_base<
  659. action<5, function_action<5, Result> >,
  660. typename detail::bind_tuple_mapper<
  661. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  662. >::type
  663. >
  664. >
  665. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  666. const Arg5& a5) {
  667. return
  668. lambda_functor_base<
  669. action<5, function_action<5, Result> >,
  670. typename detail::bind_tuple_mapper<
  671. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  672. >::type
  673. >
  674. ( typename detail::bind_tuple_mapper<
  675. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5
  676. >::type
  677. (a1, a2, a3, a4, a5)
  678. );
  679. }
  680. #else
  681. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5>
  682. inline const
  683. lambda_functor<
  684. lambda_functor_base<
  685. action<5, function_action<5> >,
  686. typename detail::bind_tuple_mapper<
  687. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  688. const Arg4, const Arg5
  689. >::type
  690. >
  691. >
  692. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  693. const Arg5& a5) {
  694. return
  695. lambda_functor_base<
  696. action<5, function_action<5> >,
  697. typename detail::bind_tuple_mapper<
  698. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  699. const Arg3, const Arg4, const Arg5
  700. >::type
  701. >
  702. ( typename detail::bind_tuple_mapper<
  703. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  704. const Arg3, const Arg4, const Arg5
  705. >::type
  706. (a1, a2, a3, a4, a5)
  707. );
  708. }
  709. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  710. class Arg5>
  711. inline const
  712. lambda_functor<
  713. lambda_functor_base<
  714. action<5, function_action<5, Result> >,
  715. typename detail::bind_tuple_mapper<
  716. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  717. const Arg4, const Arg5
  718. >::type
  719. >
  720. >
  721. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  722. const Arg5& a5) {
  723. return
  724. lambda_functor_base<
  725. action<5, function_action<5, Result> >,
  726. typename detail::bind_tuple_mapper<
  727. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  728. const Arg3, const Arg4, const Arg5
  729. >::type
  730. >
  731. ( typename detail::bind_tuple_mapper<
  732. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  733. const Arg3, const Arg4, const Arg5
  734. >::type
  735. (a1, a2, a3, a4, a5)
  736. );
  737. }
  738. template <class Result, class Par1, class Par2, class Par3, class Par4,
  739. class Arg2, class Arg3, class Arg4, class Arg5>
  740. inline const
  741. lambda_functor<
  742. lambda_functor_base<
  743. action<5, function_action<5, Result> >,
  744. typename detail::bind_tuple_mapper<
  745. Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  746. const Arg5
  747. >::type
  748. >
  749. >
  750. bind(Result(* const & a1)(Par1, Par2, Par3, Par4), const Arg2& a2,
  751. const Arg3& a3, const Arg4& a4, const Arg5& a5) {
  752. return
  753. lambda_functor_base<
  754. action<5, function_action<5, Result> >,
  755. typename detail::bind_tuple_mapper<
  756. Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  757. const Arg5
  758. >::type
  759. >
  760. ( typename detail::bind_tuple_mapper<
  761. Result(*)(Par1, Par2, Par3, Par4), const Arg2, const Arg3, const Arg4,
  762. const Arg5
  763. >::type
  764. (a1, a2, a3, a4, a5)
  765. );
  766. }
  767. #endif
  768. // 6-argument bind functions --------------------------
  769. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  770. template <class Result, class Par1, class Par2, class Par3, class Par4,
  771. class Par5, class Arg2, class Arg3, class Arg4, class Arg5,
  772. class Arg6>
  773. inline const
  774. lambda_functor<
  775. lambda_functor_base<
  776. action<6, function_action<6, Result> >,
  777. typename detail::bind_tuple_mapper<
  778. Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  779. const Arg4, const Arg5, const Arg6
  780. >::type
  781. >
  782. >
  783. bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2,
  784. const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) {
  785. return
  786. lambda_functor_base<
  787. action<6, function_action<6, Result> >,
  788. typename detail::bind_tuple_mapper<
  789. Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  790. const Arg4, const Arg5, const Arg6
  791. >::type
  792. >
  793. ( typename detail::bind_tuple_mapper<
  794. Result(&)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  795. const Arg4, const Arg5, const Arg6
  796. >::type
  797. (a1, a2, a3, a4, a5, a6)
  798. );
  799. }
  800. #endif
  801. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  802. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  803. class Arg6>
  804. inline const
  805. lambda_functor<
  806. lambda_functor_base<
  807. action<6, function_action<6> >,
  808. typename detail::bind_tuple_mapper<
  809. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  810. >::type
  811. >
  812. >
  813. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  814. const Arg5& a5, const Arg6& a6) {
  815. return
  816. lambda_functor_base<
  817. action<6, function_action<6> >,
  818. typename detail::bind_tuple_mapper<
  819. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  820. >::type
  821. >
  822. ( typename detail::bind_tuple_mapper<
  823. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  824. >::type
  825. (a1, a2, a3, a4, a5, a6)
  826. );
  827. }
  828. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  829. class Arg5, class Arg6>
  830. inline const
  831. lambda_functor<
  832. lambda_functor_base<
  833. action<6, function_action<6, Result> >,
  834. typename detail::bind_tuple_mapper<
  835. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  836. >::type
  837. >
  838. >
  839. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  840. const Arg5& a5, const Arg6& a6) {
  841. return
  842. lambda_functor_base<
  843. action<6, function_action<6, Result> >,
  844. typename detail::bind_tuple_mapper<
  845. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  846. >::type
  847. >
  848. ( typename detail::bind_tuple_mapper<
  849. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6
  850. >::type
  851. (a1, a2, a3, a4, a5, a6)
  852. );
  853. }
  854. #else
  855. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  856. class Arg6>
  857. inline const
  858. lambda_functor<
  859. lambda_functor_base<
  860. action<6, function_action<6> >,
  861. typename detail::bind_tuple_mapper<
  862. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  863. const Arg4, const Arg5, const Arg6
  864. >::type
  865. >
  866. >
  867. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  868. const Arg5& a5, const Arg6& a6) {
  869. return
  870. lambda_functor_base<
  871. action<6, function_action<6> >,
  872. typename detail::bind_tuple_mapper<
  873. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  874. const Arg3, const Arg4, const Arg5, const Arg6
  875. >::type
  876. >
  877. ( typename detail::bind_tuple_mapper<
  878. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  879. const Arg3, const Arg4, const Arg5, const Arg6
  880. >::type
  881. (a1, a2, a3, a4, a5, a6)
  882. );
  883. }
  884. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  885. class Arg5, class Arg6>
  886. inline const
  887. lambda_functor<
  888. lambda_functor_base<
  889. action<6, function_action<6, Result> >,
  890. typename detail::bind_tuple_mapper<
  891. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  892. const Arg4, const Arg5, const Arg6
  893. >::type
  894. >
  895. >
  896. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  897. const Arg5& a5, const Arg6& a6) {
  898. return
  899. lambda_functor_base<
  900. action<6, function_action<6, Result> >,
  901. typename detail::bind_tuple_mapper<
  902. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  903. const Arg3, const Arg4, const Arg5, const Arg6
  904. >::type
  905. >
  906. ( typename detail::bind_tuple_mapper<
  907. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  908. const Arg3, const Arg4, const Arg5, const Arg6
  909. >::type
  910. (a1, a2, a3, a4, a5, a6)
  911. );
  912. }
  913. template <class Result, class Par1, class Par2, class Par3, class Par4,
  914. class Par5, class Arg2, class Arg3, class Arg4, class Arg5,
  915. class Arg6>
  916. inline const
  917. lambda_functor<
  918. lambda_functor_base<
  919. action<6, function_action<6, Result> >,
  920. typename detail::bind_tuple_mapper<
  921. Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  922. const Arg4, const Arg5, const Arg6
  923. >::type
  924. >
  925. >
  926. bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5), const Arg2& a2,
  927. const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6) {
  928. return
  929. lambda_functor_base<
  930. action<6, function_action<6, Result> >,
  931. typename detail::bind_tuple_mapper<
  932. Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  933. const Arg4, const Arg5, const Arg6
  934. >::type
  935. >
  936. ( typename detail::bind_tuple_mapper<
  937. Result(*)(Par1, Par2, Par3, Par4, Par5), const Arg2, const Arg3,
  938. const Arg4, const Arg5, const Arg6
  939. >::type
  940. (a1, a2, a3, a4, a5, a6)
  941. );
  942. }
  943. #endif
  944. // 7-argument bind functions --------------------------
  945. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  946. template <class Result, class Par1, class Par2, class Par3, class Par4,
  947. class Par5, class Par6, class Arg2, class Arg3, class Arg4,
  948. class Arg5, class Arg6, class Arg7>
  949. inline const
  950. lambda_functor<
  951. lambda_functor_base<
  952. action<7, function_action<7, Result> >,
  953. typename detail::bind_tuple_mapper<
  954. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  955. const Arg4, const Arg5, const Arg6, const Arg7
  956. >::type
  957. >
  958. >
  959. bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2& a2,
  960. const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
  961. const Arg7& a7) {
  962. return
  963. lambda_functor_base<
  964. action<7, function_action<7, Result> >,
  965. typename detail::bind_tuple_mapper<
  966. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  967. const Arg4, const Arg5, const Arg6, const Arg7
  968. >::type
  969. >
  970. ( typename detail::bind_tuple_mapper<
  971. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  972. const Arg4, const Arg5, const Arg6, const Arg7
  973. >::type
  974. (a1, a2, a3, a4, a5, a6, a7)
  975. );
  976. }
  977. #endif
  978. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  979. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  980. class Arg6, class Arg7>
  981. inline const
  982. lambda_functor<
  983. lambda_functor_base<
  984. action<7, function_action<7> >,
  985. typename detail::bind_tuple_mapper<
  986. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  987. const Arg7
  988. >::type
  989. >
  990. >
  991. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  992. const Arg5& a5, const Arg6& a6, const Arg7& a7) {
  993. return
  994. lambda_functor_base<
  995. action<7, function_action<7> >,
  996. typename detail::bind_tuple_mapper<
  997. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  998. const Arg6, const Arg7
  999. >::type
  1000. >
  1001. ( typename detail::bind_tuple_mapper<
  1002. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1003. const Arg6, const Arg7
  1004. >::type
  1005. (a1, a2, a3, a4, a5, a6, a7)
  1006. );
  1007. }
  1008. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1009. class Arg5, class Arg6, class Arg7>
  1010. inline const
  1011. lambda_functor<
  1012. lambda_functor_base<
  1013. action<7, function_action<7, Result> >,
  1014. typename detail::bind_tuple_mapper<
  1015. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1016. const Arg7
  1017. >::type
  1018. >
  1019. >
  1020. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1021. const Arg5& a5, const Arg6& a6, const Arg7& a7) {
  1022. return
  1023. lambda_functor_base<
  1024. action<7, function_action<7, Result> >,
  1025. typename detail::bind_tuple_mapper<
  1026. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1027. const Arg6, const Arg7
  1028. >::type
  1029. >
  1030. ( typename detail::bind_tuple_mapper<
  1031. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1032. const Arg6, const Arg7
  1033. >::type
  1034. (a1, a2, a3, a4, a5, a6, a7)
  1035. );
  1036. }
  1037. #else
  1038. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1039. class Arg6, class Arg7>
  1040. inline const
  1041. lambda_functor<
  1042. lambda_functor_base<
  1043. action<7, function_action<7> >,
  1044. typename detail::bind_tuple_mapper<
  1045. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1046. const Arg4, const Arg5, const Arg6, const Arg7
  1047. >::type
  1048. >
  1049. >
  1050. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1051. const Arg5& a5, const Arg6& a6, const Arg7& a7) {
  1052. return
  1053. lambda_functor_base<
  1054. action<7, function_action<7> >,
  1055. typename detail::bind_tuple_mapper<
  1056. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1057. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
  1058. >::type
  1059. >
  1060. ( typename detail::bind_tuple_mapper<
  1061. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1062. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
  1063. >::type
  1064. (a1, a2, a3, a4, a5, a6, a7)
  1065. );
  1066. }
  1067. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1068. class Arg5, class Arg6, class Arg7>
  1069. inline const
  1070. lambda_functor<
  1071. lambda_functor_base<
  1072. action<7, function_action<7, Result> >,
  1073. typename detail::bind_tuple_mapper<
  1074. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1075. const Arg4, const Arg5, const Arg6, const Arg7
  1076. >::type
  1077. >
  1078. >
  1079. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1080. const Arg5& a5, const Arg6& a6, const Arg7& a7) {
  1081. return
  1082. lambda_functor_base<
  1083. action<7, function_action<7, Result> >,
  1084. typename detail::bind_tuple_mapper<
  1085. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1086. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
  1087. >::type
  1088. >
  1089. ( typename detail::bind_tuple_mapper<
  1090. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1091. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7
  1092. >::type
  1093. (a1, a2, a3, a4, a5, a6, a7)
  1094. );
  1095. }
  1096. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1097. class Par5, class Par6, class Arg2, class Arg3, class Arg4,
  1098. class Arg5, class Arg6, class Arg7>
  1099. inline const
  1100. lambda_functor<
  1101. lambda_functor_base<
  1102. action<7, function_action<7, Result> >,
  1103. typename detail::bind_tuple_mapper<
  1104. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  1105. const Arg4, const Arg5, const Arg6, const Arg7
  1106. >::type
  1107. >
  1108. >
  1109. bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6),
  1110. const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1111. const Arg6& a6, const Arg7& a7) {
  1112. return
  1113. lambda_functor_base<
  1114. action<7, function_action<7, Result> >,
  1115. typename detail::bind_tuple_mapper<
  1116. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  1117. const Arg4, const Arg5, const Arg6, const Arg7
  1118. >::type
  1119. >
  1120. ( typename detail::bind_tuple_mapper<
  1121. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6), const Arg2, const Arg3,
  1122. const Arg4, const Arg5, const Arg6, const Arg7
  1123. >::type
  1124. (a1, a2, a3, a4, a5, a6, a7)
  1125. );
  1126. }
  1127. #endif
  1128. // 8-argument bind functions --------------------------
  1129. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  1130. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1131. class Par5, class Par6, class Par7, class Arg2, class Arg3,
  1132. class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
  1133. inline const
  1134. lambda_functor<
  1135. lambda_functor_base<
  1136. action<8, function_action<8, Result> >,
  1137. typename detail::bind_tuple_mapper<
  1138. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1139. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1140. >::type
  1141. >
  1142. >
  1143. bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2& a2,
  1144. const Arg3& a3, const Arg4& a4, const Arg5& a5, const Arg6& a6,
  1145. const Arg7& a7, const Arg8& a8) {
  1146. return
  1147. lambda_functor_base<
  1148. action<8, function_action<8, Result> >,
  1149. typename detail::bind_tuple_mapper<
  1150. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1151. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1152. >::type
  1153. >
  1154. ( typename detail::bind_tuple_mapper<
  1155. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1156. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1157. >::type
  1158. (a1, a2, a3, a4, a5, a6, a7, a8)
  1159. );
  1160. }
  1161. #endif
  1162. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  1163. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1164. class Arg6, class Arg7, class Arg8>
  1165. inline const
  1166. lambda_functor<
  1167. lambda_functor_base<
  1168. action<8, function_action<8> >,
  1169. typename detail::bind_tuple_mapper<
  1170. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1171. const Arg7, const Arg8
  1172. >::type
  1173. >
  1174. >
  1175. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1176. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
  1177. return
  1178. lambda_functor_base<
  1179. action<8, function_action<8> >,
  1180. typename detail::bind_tuple_mapper<
  1181. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1182. const Arg6, const Arg7, const Arg8
  1183. >::type
  1184. >
  1185. ( typename detail::bind_tuple_mapper<
  1186. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1187. const Arg6, const Arg7, const Arg8
  1188. >::type
  1189. (a1, a2, a3, a4, a5, a6, a7, a8)
  1190. );
  1191. }
  1192. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1193. class Arg5, class Arg6, class Arg7, class Arg8>
  1194. inline const
  1195. lambda_functor<
  1196. lambda_functor_base<
  1197. action<8, function_action<8, Result> >,
  1198. typename detail::bind_tuple_mapper<
  1199. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1200. const Arg7, const Arg8
  1201. >::type
  1202. >
  1203. >
  1204. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1205. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
  1206. return
  1207. lambda_functor_base<
  1208. action<8, function_action<8, Result> >,
  1209. typename detail::bind_tuple_mapper<
  1210. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1211. const Arg6, const Arg7, const Arg8
  1212. >::type
  1213. >
  1214. ( typename detail::bind_tuple_mapper<
  1215. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1216. const Arg6, const Arg7, const Arg8
  1217. >::type
  1218. (a1, a2, a3, a4, a5, a6, a7, a8)
  1219. );
  1220. }
  1221. #else
  1222. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1223. class Arg6, class Arg7, class Arg8>
  1224. inline const
  1225. lambda_functor<
  1226. lambda_functor_base<
  1227. action<8, function_action<8> >,
  1228. typename detail::bind_tuple_mapper<
  1229. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1230. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1231. >::type
  1232. >
  1233. >
  1234. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1235. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
  1236. return
  1237. lambda_functor_base<
  1238. action<8, function_action<8> >,
  1239. typename detail::bind_tuple_mapper<
  1240. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1241. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1242. >::type
  1243. >
  1244. ( typename detail::bind_tuple_mapper<
  1245. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1246. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1247. >::type
  1248. (a1, a2, a3, a4, a5, a6, a7, a8)
  1249. );
  1250. }
  1251. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1252. class Arg5, class Arg6, class Arg7, class Arg8>
  1253. inline const
  1254. lambda_functor<
  1255. lambda_functor_base<
  1256. action<8, function_action<8, Result> >,
  1257. typename detail::bind_tuple_mapper<
  1258. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1259. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1260. >::type
  1261. >
  1262. >
  1263. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1264. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8) {
  1265. return
  1266. lambda_functor_base<
  1267. action<8, function_action<8, Result> >,
  1268. typename detail::bind_tuple_mapper<
  1269. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1270. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1271. >::type
  1272. >
  1273. ( typename detail::bind_tuple_mapper<
  1274. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1275. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1276. >::type
  1277. (a1, a2, a3, a4, a5, a6, a7, a8)
  1278. );
  1279. }
  1280. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1281. class Par5, class Par6, class Par7, class Arg2, class Arg3,
  1282. class Arg4, class Arg5, class Arg6, class Arg7, class Arg8>
  1283. inline const
  1284. lambda_functor<
  1285. lambda_functor_base<
  1286. action<8, function_action<8, Result> >,
  1287. typename detail::bind_tuple_mapper<
  1288. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1289. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1290. >::type
  1291. >
  1292. >
  1293. bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7),
  1294. const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1295. const Arg6& a6, const Arg7& a7, const Arg8& a8) {
  1296. return
  1297. lambda_functor_base<
  1298. action<8, function_action<8, Result> >,
  1299. typename detail::bind_tuple_mapper<
  1300. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1301. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1302. >::type
  1303. >
  1304. ( typename detail::bind_tuple_mapper<
  1305. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7), const Arg2,
  1306. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8
  1307. >::type
  1308. (a1, a2, a3, a4, a5, a6, a7, a8)
  1309. );
  1310. }
  1311. #endif
  1312. // 9-argument bind functions --------------------------
  1313. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  1314. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1315. class Par5, class Par6, class Par7, class Par8, class Arg2,
  1316. class Arg3, class Arg4, class Arg5, class Arg6, class Arg7,
  1317. class Arg8, class Arg9>
  1318. inline const
  1319. lambda_functor<
  1320. lambda_functor_base<
  1321. action<9, function_action<9, Result> >,
  1322. typename detail::bind_tuple_mapper<
  1323. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1324. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8,
  1325. const Arg9
  1326. >::type
  1327. >
  1328. >
  1329. bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8),
  1330. const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1331. const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) {
  1332. return
  1333. lambda_functor_base<
  1334. action<9, function_action<9, Result> >,
  1335. typename detail::bind_tuple_mapper<
  1336. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1337. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1338. const Arg8, const Arg9
  1339. >::type
  1340. >
  1341. ( typename detail::bind_tuple_mapper<
  1342. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1343. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1344. const Arg8, const Arg9
  1345. >::type
  1346. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1347. );
  1348. }
  1349. #endif
  1350. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  1351. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1352. class Arg6, class Arg7, class Arg8, class Arg9>
  1353. inline const
  1354. lambda_functor<
  1355. lambda_functor_base<
  1356. action<9, function_action<9> >,
  1357. typename detail::bind_tuple_mapper<
  1358. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1359. const Arg7, const Arg8, const Arg9
  1360. >::type
  1361. >
  1362. >
  1363. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1364. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1365. const Arg9& a9) {
  1366. return
  1367. lambda_functor_base<
  1368. action<9, function_action<9> >,
  1369. typename detail::bind_tuple_mapper<
  1370. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1371. const Arg6, const Arg7, const Arg8, const Arg9
  1372. >::type
  1373. >
  1374. ( typename detail::bind_tuple_mapper<
  1375. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1376. const Arg6, const Arg7, const Arg8, const Arg9
  1377. >::type
  1378. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1379. );
  1380. }
  1381. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1382. class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
  1383. inline const
  1384. lambda_functor<
  1385. lambda_functor_base<
  1386. action<9, function_action<9, Result> >,
  1387. typename detail::bind_tuple_mapper<
  1388. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1389. const Arg7, const Arg8, const Arg9
  1390. >::type
  1391. >
  1392. >
  1393. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1394. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1395. const Arg9& a9) {
  1396. return
  1397. lambda_functor_base<
  1398. action<9, function_action<9, Result> >,
  1399. typename detail::bind_tuple_mapper<
  1400. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1401. const Arg6, const Arg7, const Arg8, const Arg9
  1402. >::type
  1403. >
  1404. ( typename detail::bind_tuple_mapper<
  1405. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1406. const Arg6, const Arg7, const Arg8, const Arg9
  1407. >::type
  1408. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1409. );
  1410. }
  1411. #else
  1412. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1413. class Arg6, class Arg7, class Arg8, class Arg9>
  1414. inline const
  1415. lambda_functor<
  1416. lambda_functor_base<
  1417. action<9, function_action<9> >,
  1418. typename detail::bind_tuple_mapper<
  1419. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1420. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9
  1421. >::type
  1422. >
  1423. >
  1424. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1425. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1426. const Arg9& a9) {
  1427. return
  1428. lambda_functor_base<
  1429. action<9, function_action<9> >,
  1430. typename detail::bind_tuple_mapper<
  1431. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1432. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1433. const Arg8, const Arg9
  1434. >::type
  1435. >
  1436. ( typename detail::bind_tuple_mapper<
  1437. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1438. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1439. const Arg8, const Arg9
  1440. >::type
  1441. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1442. );
  1443. }
  1444. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1445. class Arg5, class Arg6, class Arg7, class Arg8, class Arg9>
  1446. inline const
  1447. lambda_functor<
  1448. lambda_functor_base<
  1449. action<9, function_action<9, Result> >,
  1450. typename detail::bind_tuple_mapper<
  1451. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1452. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9
  1453. >::type
  1454. >
  1455. >
  1456. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1457. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1458. const Arg9& a9) {
  1459. return
  1460. lambda_functor_base<
  1461. action<9, function_action<9, Result> >,
  1462. typename detail::bind_tuple_mapper<
  1463. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1464. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1465. const Arg8, const Arg9
  1466. >::type
  1467. >
  1468. ( typename detail::bind_tuple_mapper<
  1469. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1470. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1471. const Arg8, const Arg9
  1472. >::type
  1473. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1474. );
  1475. }
  1476. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1477. class Par5, class Par6, class Par7, class Par8, class Arg2,
  1478. class Arg3, class Arg4, class Arg5, class Arg6, class Arg7,
  1479. class Arg8, class Arg9>
  1480. inline const
  1481. lambda_functor<
  1482. lambda_functor_base<
  1483. action<9, function_action<9, Result> >,
  1484. typename detail::bind_tuple_mapper<
  1485. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1486. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7, const Arg8,
  1487. const Arg9
  1488. >::type
  1489. >
  1490. >
  1491. bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8),
  1492. const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1493. const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9) {
  1494. return
  1495. lambda_functor_base<
  1496. action<9, function_action<9, Result> >,
  1497. typename detail::bind_tuple_mapper<
  1498. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1499. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1500. const Arg8, const Arg9
  1501. >::type
  1502. >
  1503. ( typename detail::bind_tuple_mapper<
  1504. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8), const Arg2,
  1505. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1506. const Arg8, const Arg9
  1507. >::type
  1508. (a1, a2, a3, a4, a5, a6, a7, a8, a9)
  1509. );
  1510. }
  1511. #endif
  1512. // 10-argument bind functions --------------------------
  1513. #ifndef BOOST_REF_TO_FUNC_CONFLICTS_WITH_REF_TO_T
  1514. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1515. class Par5, class Par6, class Par7, class Par8, class Par9,
  1516. class Arg2, class Arg3, class Arg4, class Arg5, class Arg6,
  1517. class Arg7, class Arg8, class Arg9, class Arg10>
  1518. inline const
  1519. lambda_functor<
  1520. lambda_functor_base<
  1521. action<10, function_action<10, Result> >,
  1522. typename detail::bind_tuple_mapper<
  1523. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1524. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1525. const Arg8, const Arg9, const Arg10
  1526. >::type
  1527. >
  1528. >
  1529. bind(Result(&a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1530. const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1531. const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9,
  1532. const Arg10& a10) {
  1533. return
  1534. lambda_functor_base<
  1535. action<10, function_action<10, Result> >,
  1536. typename detail::bind_tuple_mapper<
  1537. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1538. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1539. const Arg7, const Arg8, const Arg9, const Arg10
  1540. >::type
  1541. >
  1542. ( typename detail::bind_tuple_mapper<
  1543. Result(&)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1544. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1545. const Arg7, const Arg8, const Arg9, const Arg10
  1546. >::type
  1547. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1548. );
  1549. }
  1550. #endif
  1551. #ifndef BOOST_LAMBDA_INCORRECT_BIND_OVERLOADING
  1552. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1553. class Arg6, class Arg7, class Arg8, class Arg9, class Arg10>
  1554. inline const
  1555. lambda_functor<
  1556. lambda_functor_base<
  1557. action<10, function_action<10> >,
  1558. typename detail::bind_tuple_mapper<
  1559. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1560. const Arg7, const Arg8, const Arg9, const Arg10
  1561. >::type
  1562. >
  1563. >
  1564. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1565. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1566. const Arg9& a9, const Arg10& a10) {
  1567. return
  1568. lambda_functor_base<
  1569. action<10, function_action<10> >,
  1570. typename detail::bind_tuple_mapper<
  1571. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1572. const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
  1573. >::type
  1574. >
  1575. ( typename detail::bind_tuple_mapper<
  1576. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1577. const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
  1578. >::type
  1579. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1580. );
  1581. }
  1582. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1583. class Arg5, class Arg6, class Arg7, class Arg8, class Arg9,
  1584. class Arg10>
  1585. inline const
  1586. lambda_functor<
  1587. lambda_functor_base<
  1588. action<10, function_action<10, Result> >,
  1589. typename detail::bind_tuple_mapper<
  1590. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1591. const Arg7, const Arg8, const Arg9, const Arg10
  1592. >::type
  1593. >
  1594. >
  1595. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1596. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1597. const Arg9& a9, const Arg10& a10) {
  1598. return
  1599. lambda_functor_base<
  1600. action<10, function_action<10, Result> >,
  1601. typename detail::bind_tuple_mapper<
  1602. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1603. const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
  1604. >::type
  1605. >
  1606. ( typename detail::bind_tuple_mapper<
  1607. const Arg1, const Arg2, const Arg3, const Arg4, const Arg5,
  1608. const Arg6, const Arg7, const Arg8, const Arg9, const Arg10
  1609. >::type
  1610. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1611. );
  1612. }
  1613. #else
  1614. template <class Arg1, class Arg2, class Arg3, class Arg4, class Arg5,
  1615. class Arg6, class Arg7, class Arg8, class Arg9, class Arg10>
  1616. inline const
  1617. lambda_functor<
  1618. lambda_functor_base<
  1619. action<10, function_action<10> >,
  1620. typename detail::bind_tuple_mapper<
  1621. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1622. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9,
  1623. const Arg10
  1624. >::type
  1625. >
  1626. >
  1627. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1628. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1629. const Arg9& a9, const Arg10& a10) {
  1630. return
  1631. lambda_functor_base<
  1632. action<10, function_action<10> >,
  1633. typename detail::bind_tuple_mapper<
  1634. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1635. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1636. const Arg8, const Arg9, const Arg10
  1637. >::type
  1638. >
  1639. ( typename detail::bind_tuple_mapper<
  1640. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1641. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1642. const Arg8, const Arg9, const Arg10
  1643. >::type
  1644. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1645. );
  1646. }
  1647. template <class Result, class Arg1, class Arg2, class Arg3, class Arg4,
  1648. class Arg5, class Arg6, class Arg7, class Arg8, class Arg9,
  1649. class Arg10>
  1650. inline const
  1651. lambda_functor<
  1652. lambda_functor_base<
  1653. action<10, function_action<10, Result> >,
  1654. typename detail::bind_tuple_mapper<
  1655. typename detail::constify_non_funcs<Arg1>::type, const Arg2, const Arg3,
  1656. const Arg4, const Arg5, const Arg6, const Arg7, const Arg8, const Arg9,
  1657. const Arg10
  1658. >::type
  1659. >
  1660. >
  1661. bind(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4,
  1662. const Arg5& a5, const Arg6& a6, const Arg7& a7, const Arg8& a8,
  1663. const Arg9& a9, const Arg10& a10) {
  1664. return
  1665. lambda_functor_base<
  1666. action<10, function_action<10, Result> >,
  1667. typename detail::bind_tuple_mapper<
  1668. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1669. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1670. const Arg8, const Arg9, const Arg10
  1671. >::type
  1672. >
  1673. ( typename detail::bind_tuple_mapper<
  1674. typename detail::constify_non_funcs<Arg1>::type, const Arg2,
  1675. const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1676. const Arg8, const Arg9, const Arg10
  1677. >::type
  1678. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1679. );
  1680. }
  1681. template <class Result, class Par1, class Par2, class Par3, class Par4,
  1682. class Par5, class Par6, class Par7, class Par8, class Par9,
  1683. class Arg2, class Arg3, class Arg4, class Arg5, class Arg6,
  1684. class Arg7, class Arg8, class Arg9, class Arg10>
  1685. inline const
  1686. lambda_functor<
  1687. lambda_functor_base<
  1688. action<10, function_action<10, Result> >,
  1689. typename detail::bind_tuple_mapper<
  1690. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1691. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6, const Arg7,
  1692. const Arg8, const Arg9, const Arg10
  1693. >::type
  1694. >
  1695. >
  1696. bind(Result(* const & a1)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8,
  1697. Par9), const Arg2& a2, const Arg3& a3, const Arg4& a4, const Arg5& a5,
  1698. const Arg6& a6, const Arg7& a7, const Arg8& a8, const Arg9& a9,
  1699. const Arg10& a10) {
  1700. return
  1701. lambda_functor_base<
  1702. action<10, function_action<10, Result> >,
  1703. typename detail::bind_tuple_mapper<
  1704. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1705. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1706. const Arg7, const Arg8, const Arg9, const Arg10
  1707. >::type
  1708. >
  1709. ( typename detail::bind_tuple_mapper<
  1710. Result(*)(Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8, Par9),
  1711. const Arg2, const Arg3, const Arg4, const Arg5, const Arg6,
  1712. const Arg7, const Arg8, const Arg9, const Arg10
  1713. >::type
  1714. (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)
  1715. );
  1716. }
  1717. #endif
  1718. } // namespace lambda
  1719. } // namespace boost
  1720. #endif