unpack_args.hpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. // Copyright Aleksey Gurtovoy 2002-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/unpack_args.hpp" header
  8. // -- DO NOT modify by hand!
  9. namespace boost { namespace mpl {
  10. namespace aux {
  11. template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl
  12. {
  13. template< typename F, typename Args > struct apply;
  14. };
  15. template<> struct unpack_args_impl<0>
  16. {
  17. template< typename F, typename Args > struct apply
  18. : apply0<
  19. F
  20. >
  21. {
  22. };
  23. };
  24. template<> struct unpack_args_impl<1>
  25. {
  26. template< typename F, typename Args > struct apply
  27. : apply1<
  28. F
  29. , typename at_c< Args,0 >::type
  30. >
  31. {
  32. };
  33. };
  34. template<> struct unpack_args_impl<2>
  35. {
  36. template< typename F, typename Args > struct apply
  37. : apply2<
  38. F
  39. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  40. >
  41. {
  42. };
  43. };
  44. template<> struct unpack_args_impl<3>
  45. {
  46. template< typename F, typename Args > struct apply
  47. : apply3<
  48. F
  49. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  50. , typename at_c< Args,2 >::type
  51. >
  52. {
  53. };
  54. };
  55. template<> struct unpack_args_impl<4>
  56. {
  57. template< typename F, typename Args > struct apply
  58. : apply4<
  59. F
  60. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  61. , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
  62. >
  63. {
  64. };
  65. };
  66. template<> struct unpack_args_impl<5>
  67. {
  68. template< typename F, typename Args > struct apply
  69. : apply5<
  70. F
  71. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  72. , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
  73. , typename at_c< Args,4 >::type
  74. >
  75. {
  76. };
  77. };
  78. }
  79. template<
  80. typename F
  81. >
  82. struct unpack_args
  83. {
  84. template< typename Args > struct apply
  85. : aux::unpack_args_impl< size<Args>::value >
  86. ::template apply< F,Args >
  87. {
  88. };
  89. };
  90. BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
  91. }}