args.hpp 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. ///////////////////////////////////////////////////////////////////////////////
  2. /// \file args.hpp
  3. /// Contains definition of \c term\<\>, \c list1\<\>, \c list2\<\>, ...
  4. /// class templates.
  5. //
  6. // Copyright 2008 Eric Niebler. Distributed under the Boost
  7. // Software License, Version 1.0. (See accompanying file
  8. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. template< typename Arg0 >
  10. struct term
  11. {
  12. static const long arity = 0;
  13. typedef Arg0 child0;
  14. typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  15. typedef Arg0 back_;
  16. };
  17. template< typename Arg0 >
  18. struct list1
  19. {
  20. static const long arity = 1;
  21. typedef Arg0 child0;
  22. typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  23. typedef Arg0 back_;
  24. };
  25. template< typename Arg0 , typename Arg1 >
  26. struct list2
  27. {
  28. static const long arity = 2;
  29. typedef Arg0 child0; typedef Arg1 child1;
  30. typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  31. typedef Arg1 back_;
  32. };
  33. template< typename Arg0 , typename Arg1 , typename Arg2 >
  34. struct list3
  35. {
  36. static const long arity = 3;
  37. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2;
  38. typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  39. typedef Arg2 back_;
  40. };
  41. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
  42. struct list4
  43. {
  44. static const long arity = 4;
  45. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3;
  46. typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  47. typedef Arg3 back_;
  48. };
  49. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
  50. struct list5
  51. {
  52. static const long arity = 5;
  53. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4;
  54. typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  55. typedef Arg4 back_;
  56. };
  57. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
  58. struct list6
  59. {
  60. static const long arity = 6;
  61. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5;
  62. typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  63. typedef Arg5 back_;
  64. };
  65. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
  66. struct list7
  67. {
  68. static const long arity = 7;
  69. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6;
  70. typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
  71. typedef Arg6 back_;
  72. };
  73. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
  74. struct list8
  75. {
  76. static const long arity = 8;
  77. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7;
  78. typedef mpl::void_ child8; typedef mpl::void_ child9;
  79. typedef Arg7 back_;
  80. };
  81. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
  82. struct list9
  83. {
  84. static const long arity = 9;
  85. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8;
  86. typedef mpl::void_ child9;
  87. typedef Arg8 back_;
  88. };
  89. template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
  90. struct list10
  91. {
  92. static const long arity = 10;
  93. typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8; typedef Arg9 child9;
  94. typedef Arg9 back_;
  95. };