apply.hpp 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // Copyright Aleksey Gurtovoy 2000-2004
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. // *Preprocessed* version of the main "apply.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. template<
  11. typename F
  12. >
  13. struct apply0
  14. : apply_wrap0<
  15. typename lambda<F>::type
  16. >
  17. {
  18. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  19. 1
  20. , apply0
  21. , (F )
  22. )
  23. };
  24. template<
  25. typename F
  26. >
  27. struct apply< F,na,na,na,na,na >
  28. : apply0<F>
  29. {
  30. };
  31. template<
  32. typename F, typename T1
  33. >
  34. struct apply1
  35. : apply_wrap1<
  36. typename lambda<F>::type
  37. , T1
  38. >
  39. {
  40. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  41. 2
  42. , apply1
  43. , (F, T1)
  44. )
  45. };
  46. template<
  47. typename F, typename T1
  48. >
  49. struct apply< F,T1,na,na,na,na >
  50. : apply1< F,T1 >
  51. {
  52. };
  53. template<
  54. typename F, typename T1, typename T2
  55. >
  56. struct apply2
  57. : apply_wrap2<
  58. typename lambda<F>::type
  59. , T1, T2
  60. >
  61. {
  62. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  63. 3
  64. , apply2
  65. , (F, T1, T2)
  66. )
  67. };
  68. template<
  69. typename F, typename T1, typename T2
  70. >
  71. struct apply< F,T1,T2,na,na,na >
  72. : apply2< F,T1,T2 >
  73. {
  74. };
  75. template<
  76. typename F, typename T1, typename T2, typename T3
  77. >
  78. struct apply3
  79. : apply_wrap3<
  80. typename lambda<F>::type
  81. , T1, T2, T3
  82. >
  83. {
  84. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  85. 4
  86. , apply3
  87. , (F, T1, T2, T3)
  88. )
  89. };
  90. template<
  91. typename F, typename T1, typename T2, typename T3
  92. >
  93. struct apply< F,T1,T2,T3,na,na >
  94. : apply3< F,T1,T2,T3 >
  95. {
  96. };
  97. template<
  98. typename F, typename T1, typename T2, typename T3, typename T4
  99. >
  100. struct apply4
  101. : apply_wrap4<
  102. typename lambda<F>::type
  103. , T1, T2, T3, T4
  104. >
  105. {
  106. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  107. 5
  108. , apply4
  109. , (F, T1, T2, T3, T4)
  110. )
  111. };
  112. template<
  113. typename F, typename T1, typename T2, typename T3, typename T4
  114. >
  115. struct apply< F,T1,T2,T3,T4,na >
  116. : apply4< F,T1,T2,T3,T4 >
  117. {
  118. };
  119. template<
  120. typename F, typename T1, typename T2, typename T3, typename T4
  121. , typename T5
  122. >
  123. struct apply5
  124. : apply_wrap5<
  125. typename lambda<F>::type
  126. , T1, T2, T3, T4, T5
  127. >
  128. {
  129. BOOST_MPL_AUX_LAMBDA_SUPPORT(
  130. 6
  131. , apply5
  132. , (F, T1, T2, T3, T4, T5)
  133. )
  134. };
  135. /// primary template (not a specialization!)
  136. template<
  137. typename F, typename T1, typename T2, typename T3, typename T4
  138. , typename T5
  139. >
  140. struct apply
  141. : apply5< F,T1,T2,T3,T4,T5 >
  142. {
  143. };
  144. }}