unpack_args.hpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. : aux::unpack_args_impl< size<Args>::value,F, Args >
  72. {
  73. };
  74. };
  75. BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args)
  76. }}