tuple10.hpp 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. This is an auto-generated file. Do not edit!
  6. ==============================================================================*/
  7. namespace boost { namespace fusion
  8. {
  9. template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
  10. struct tuple : vector<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
  11. {
  12. typedef vector<
  13. T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
  14. base_type;
  15. tuple()
  16. : base_type() {}
  17. tuple(tuple const& rhs)
  18. : base_type(rhs) {}
  19. template <typename U1, typename U2>
  20. tuple(std::pair<U1, U2> const& rhs)
  21. : base_type(rhs) {}
  22. explicit
  23. tuple(typename detail::call_param<T0 >::type _0)
  24. : base_type(_0) {}
  25. template <typename U0>
  26. tuple(tuple<U0> const& rhs)
  27. : base_type(rhs) {}
  28. template <typename U0>
  29. tuple& operator=(tuple<U0> const& rhs)
  30. {
  31. base_type::operator=(rhs);
  32. return *this;
  33. }
  34. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1)
  35. : base_type(_0 , _1) {}
  36. template <typename U0 , typename U1>
  37. tuple(tuple<U0 , U1> const& rhs)
  38. : base_type(rhs) {}
  39. template <typename U0 , typename U1>
  40. tuple& operator=(tuple<U0 , U1> const& rhs)
  41. {
  42. base_type::operator=(rhs);
  43. return *this;
  44. }
  45. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2)
  46. : base_type(_0 , _1 , _2) {}
  47. template <typename U0 , typename U1 , typename U2>
  48. tuple(tuple<U0 , U1 , U2> const& rhs)
  49. : base_type(rhs) {}
  50. template <typename U0 , typename U1 , typename U2>
  51. tuple& operator=(tuple<U0 , U1 , U2> const& rhs)
  52. {
  53. base_type::operator=(rhs);
  54. return *this;
  55. }
  56. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3)
  57. : base_type(_0 , _1 , _2 , _3) {}
  58. template <typename U0 , typename U1 , typename U2 , typename U3>
  59. tuple(tuple<U0 , U1 , U2 , U3> const& rhs)
  60. : base_type(rhs) {}
  61. template <typename U0 , typename U1 , typename U2 , typename U3>
  62. tuple& operator=(tuple<U0 , U1 , U2 , U3> const& rhs)
  63. {
  64. base_type::operator=(rhs);
  65. return *this;
  66. }
  67. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4)
  68. : base_type(_0 , _1 , _2 , _3 , _4) {}
  69. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
  70. tuple(tuple<U0 , U1 , U2 , U3 , U4> const& rhs)
  71. : base_type(rhs) {}
  72. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
  73. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4> const& rhs)
  74. {
  75. base_type::operator=(rhs);
  76. return *this;
  77. }
  78. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5)
  79. : base_type(_0 , _1 , _2 , _3 , _4 , _5) {}
  80. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
  81. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5> const& rhs)
  82. : base_type(rhs) {}
  83. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
  84. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5> const& rhs)
  85. {
  86. base_type::operator=(rhs);
  87. return *this;
  88. }
  89. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6)
  90. : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6) {}
  91. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
  92. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& rhs)
  93. : base_type(rhs) {}
  94. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
  95. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& rhs)
  96. {
  97. base_type::operator=(rhs);
  98. return *this;
  99. }
  100. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7)
  101. : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7) {}
  102. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
  103. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& rhs)
  104. : base_type(rhs) {}
  105. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
  106. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& rhs)
  107. {
  108. base_type::operator=(rhs);
  109. return *this;
  110. }
  111. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8)
  112. : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8) {}
  113. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
  114. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& rhs)
  115. : base_type(rhs) {}
  116. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
  117. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& rhs)
  118. {
  119. base_type::operator=(rhs);
  120. return *this;
  121. }
  122. tuple(typename detail::call_param<T0 >::type _0 , typename detail::call_param<T1 >::type _1 , typename detail::call_param<T2 >::type _2 , typename detail::call_param<T3 >::type _3 , typename detail::call_param<T4 >::type _4 , typename detail::call_param<T5 >::type _5 , typename detail::call_param<T6 >::type _6 , typename detail::call_param<T7 >::type _7 , typename detail::call_param<T8 >::type _8 , typename detail::call_param<T9 >::type _9)
  123. : base_type(_0 , _1 , _2 , _3 , _4 , _5 , _6 , _7 , _8 , _9) {}
  124. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
  125. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
  126. : base_type(rhs) {}
  127. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
  128. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
  129. {
  130. base_type::operator=(rhs);
  131. return *this;
  132. }
  133. template <typename T>
  134. tuple& operator=(T const& rhs)
  135. {
  136. base_type::operator=(rhs);
  137. return *this;
  138. }
  139. tuple& operator=(tuple const& rhs)
  140. {
  141. base_type::operator=(rhs);
  142. return *this;
  143. }
  144. template <typename U1, typename U2>
  145. tuple& operator=(std::pair<U1, U2> const& rhs)
  146. {
  147. base_type::operator=(rhs);
  148. return *this;
  149. }
  150. };
  151. template <typename Tuple>
  152. struct tuple_size : result_of::size<Tuple> {};
  153. template <int N, typename Tuple>
  154. struct tuple_element : result_of::value_at_c<Tuple, N> {};
  155. template <int N, typename Tuple>
  156. inline typename
  157. lazy_disable_if<
  158. is_const<Tuple>
  159. , result_of::at_c<Tuple, N>
  160. >::type
  161. get(Tuple& tup)
  162. {
  163. return at_c<N>(tup);
  164. }
  165. template <int N, typename Tuple>
  166. inline typename result_of::at_c<Tuple const, N>::type
  167. get(Tuple const& tup)
  168. {
  169. return at_c<N>(tup);
  170. }
  171. }}