unpack_args.hpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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< int size, typename F, typename Args >
  12. struct unpack_args_impl;
  13. template< typename F, typename Args >
  14. struct unpack_args_impl< 0,F,Args >
  15. : apply0<
  16. F
  17. >
  18. {
  19. };
  20. template< typename F, typename Args >
  21. struct unpack_args_impl< 1,F,Args >
  22. : apply1<
  23. F
  24. , typename at_c< Args,0 >::type
  25. >
  26. {
  27. };
  28. template< typename F, typename Args >
  29. struct unpack_args_impl< 2,F,Args >
  30. : apply2<
  31. F
  32. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  33. >
  34. {
  35. };
  36. template< typename F, typename Args >
  37. struct unpack_args_impl< 3,F,Args >
  38. : apply3<
  39. F
  40. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  41. , typename at_c< Args,2 >::type
  42. >
  43. {
  44. };
  45. template< typename F, typename Args >
  46. struct unpack_args_impl< 4,F,Args >
  47. : apply4<
  48. F
  49. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  50. , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
  51. >
  52. {
  53. };
  54. template< typename F, typename Args >
  55. struct unpack_args_impl< 5,F,Args >
  56. : apply5<
  57. F
  58. , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type
  59. , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type
  60. , typename at_c< Args,4 >::type
  61. >
  62. {
  63. };
  64. }
  65. template<
  66. typename F
  67. >
  68. struct unpack_args
  69. {
  70. template< typename Args > struct apply
  71. {
  72. typedef typename aux::unpack_args_impl<
  73. size<Args>::value
  74. , F
  75. , Args
  76. >::type type;
  77. };
  78. };
  79. BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
  80. }}