apply_wrap.hpp 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  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 "boost/mpl/apply_wrap.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. template< typename F>
  11. struct msvc_apply0
  12. {
  13. template< bool > struct f_ : F {};
  14. template<> struct f_<true>
  15. {
  16. template< typename P = int > struct apply
  17. {
  18. typedef int type;
  19. };
  20. };
  21. template< typename T = int > struct result_
  22. : f_< aux::msvc_never_true<F>::value >
  23. ::template apply<>
  24. {
  25. };
  26. };
  27. template<
  28. typename F
  29. >
  30. struct apply_wrap0
  31. {
  32. typedef typename msvc_apply0<F>::template result_<
  33. >::type type;
  34. };
  35. /// workaround for ETI bug
  36. template<>
  37. struct apply_wrap0<int>
  38. {
  39. typedef int type;
  40. };
  41. template< typename F>
  42. struct msvc_apply1
  43. {
  44. template< bool > struct f_ : F {};
  45. template<> struct f_<true>
  46. {
  47. template< typename P1 > struct apply
  48. {
  49. typedef int type;
  50. };
  51. };
  52. template< typename T1 > struct result_
  53. : f_< aux::msvc_never_true<F>::value >
  54. ::template apply<T1>
  55. {
  56. };
  57. };
  58. template<
  59. typename F, typename T1
  60. >
  61. struct apply_wrap1
  62. {
  63. typedef typename msvc_apply1<F>::template result_<
  64. T1
  65. >::type type;
  66. };
  67. /// workaround for ETI bug
  68. template<>
  69. struct apply_wrap1< int,int >
  70. {
  71. typedef int type;
  72. };
  73. template< typename F>
  74. struct msvc_apply2
  75. {
  76. template< bool > struct f_ : F {};
  77. template<> struct f_<true>
  78. {
  79. template< typename P1, typename P2 > struct apply
  80. {
  81. typedef int type;
  82. };
  83. };
  84. template< typename T1, typename T2 > struct result_
  85. : f_< aux::msvc_never_true<F>::value >
  86. ::template apply< T1,T2 >
  87. {
  88. };
  89. };
  90. template<
  91. typename F, typename T1, typename T2
  92. >
  93. struct apply_wrap2
  94. {
  95. typedef typename msvc_apply2<F>::template result_<
  96. T1, T2
  97. >::type type;
  98. };
  99. /// workaround for ETI bug
  100. template<>
  101. struct apply_wrap2< int,int,int >
  102. {
  103. typedef int type;
  104. };
  105. template< typename F>
  106. struct msvc_apply3
  107. {
  108. template< bool > struct f_ : F {};
  109. template<> struct f_<true>
  110. {
  111. template< typename P1, typename P2, typename P3 > struct apply
  112. {
  113. typedef int type;
  114. };
  115. };
  116. template< typename T1, typename T2, typename T3 > struct result_
  117. : f_< aux::msvc_never_true<F>::value >
  118. ::template apply< T1,T2,T3 >
  119. {
  120. };
  121. };
  122. template<
  123. typename F, typename T1, typename T2, typename T3
  124. >
  125. struct apply_wrap3
  126. {
  127. typedef typename msvc_apply3<F>::template result_<
  128. T1, T2, T3
  129. >::type type;
  130. };
  131. /// workaround for ETI bug
  132. template<>
  133. struct apply_wrap3< int,int,int,int >
  134. {
  135. typedef int type;
  136. };
  137. template< typename F>
  138. struct msvc_apply4
  139. {
  140. template< bool > struct f_ : F {};
  141. template<> struct f_<true>
  142. {
  143. template<
  144. typename P1, typename P2, typename P3, typename P4
  145. >
  146. struct apply
  147. {
  148. typedef int type;
  149. };
  150. };
  151. template<
  152. typename T1, typename T2, typename T3, typename T4
  153. >
  154. struct result_
  155. : f_< aux::msvc_never_true<F>::value >
  156. ::template apply< T1,T2,T3,T4 >
  157. {
  158. };
  159. };
  160. template<
  161. typename F, typename T1, typename T2, typename T3, typename T4
  162. >
  163. struct apply_wrap4
  164. {
  165. typedef typename msvc_apply4<F>::template result_<
  166. T1, T2, T3, T4
  167. >::type type;
  168. };
  169. /// workaround for ETI bug
  170. template<>
  171. struct apply_wrap4< int,int,int,int,int >
  172. {
  173. typedef int type;
  174. };
  175. template< typename F>
  176. struct msvc_apply5
  177. {
  178. template< bool > struct f_ : F {};
  179. template<> struct f_<true>
  180. {
  181. template<
  182. typename P1, typename P2, typename P3, typename P4
  183. , typename P5
  184. >
  185. struct apply
  186. {
  187. typedef int type;
  188. };
  189. };
  190. template<
  191. typename T1, typename T2, typename T3, typename T4
  192. , typename T5
  193. >
  194. struct result_
  195. : f_< aux::msvc_never_true<F>::value >
  196. ::template apply< T1,T2,T3,T4,T5 >
  197. {
  198. };
  199. };
  200. template<
  201. typename F, typename T1, typename T2, typename T3, typename T4
  202. , typename T5
  203. >
  204. struct apply_wrap5
  205. {
  206. typedef typename msvc_apply5<F>::template result_<
  207. T1, T2, T3, T4, T5
  208. >::type type;
  209. };
  210. /// workaround for ETI bug
  211. template<>
  212. struct apply_wrap5< int,int,int,int,int,int >
  213. {
  214. typedef int type;
  215. };
  216. }}