tuple10.hpp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. BOOST_FUSION_GPU_ENABLED tuple()
  16. : base_type() {}
  17. BOOST_FUSION_GPU_ENABLED tuple(tuple const& rhs)
  18. : base_type(static_cast<base_type const&>(rhs)) {}
  19. template <typename U1, typename U2>
  20. BOOST_FUSION_GPU_ENABLED
  21. tuple(std::pair<U1, U2> const& rhs)
  22. : base_type(rhs) {}
  23. BOOST_FUSION_GPU_ENABLED
  24. explicit
  25. tuple(typename detail::call_param<T0 >::type arg0)
  26. : base_type(arg0) {}
  27. template <typename U0>
  28. BOOST_FUSION_GPU_ENABLED
  29. tuple(tuple<U0> const& rhs)
  30. : base_type(rhs) {}
  31. template <typename U0>
  32. BOOST_FUSION_GPU_ENABLED
  33. tuple& operator=(tuple<U0> const& rhs)
  34. {
  35. base_type::operator=(rhs);
  36. return *this;
  37. }
  38. BOOST_FUSION_GPU_ENABLED
  39. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1)
  40. : base_type(arg0 , arg1) {}
  41. template <typename U0 , typename U1>
  42. BOOST_FUSION_GPU_ENABLED
  43. tuple(tuple<U0 , U1> const& rhs)
  44. : base_type(rhs) {}
  45. template <typename U0 , typename U1>
  46. BOOST_FUSION_GPU_ENABLED
  47. tuple& operator=(tuple<U0 , U1> const& rhs)
  48. {
  49. base_type::operator=(rhs);
  50. return *this;
  51. }
  52. BOOST_FUSION_GPU_ENABLED
  53. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2)
  54. : base_type(arg0 , arg1 , arg2) {}
  55. template <typename U0 , typename U1 , typename U2>
  56. BOOST_FUSION_GPU_ENABLED
  57. tuple(tuple<U0 , U1 , U2> const& rhs)
  58. : base_type(rhs) {}
  59. template <typename U0 , typename U1 , typename U2>
  60. BOOST_FUSION_GPU_ENABLED
  61. tuple& operator=(tuple<U0 , U1 , U2> const& rhs)
  62. {
  63. base_type::operator=(rhs);
  64. return *this;
  65. }
  66. BOOST_FUSION_GPU_ENABLED
  67. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3)
  68. : base_type(arg0 , arg1 , arg2 , arg3) {}
  69. template <typename U0 , typename U1 , typename U2 , typename U3>
  70. BOOST_FUSION_GPU_ENABLED
  71. tuple(tuple<U0 , U1 , U2 , U3> const& rhs)
  72. : base_type(rhs) {}
  73. template <typename U0 , typename U1 , typename U2 , typename U3>
  74. BOOST_FUSION_GPU_ENABLED
  75. tuple& operator=(tuple<U0 , U1 , U2 , U3> const& rhs)
  76. {
  77. base_type::operator=(rhs);
  78. return *this;
  79. }
  80. BOOST_FUSION_GPU_ENABLED
  81. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4)
  82. : base_type(arg0 , arg1 , arg2 , arg3 , arg4) {}
  83. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
  84. BOOST_FUSION_GPU_ENABLED
  85. tuple(tuple<U0 , U1 , U2 , U3 , U4> const& rhs)
  86. : base_type(rhs) {}
  87. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
  88. BOOST_FUSION_GPU_ENABLED
  89. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4> const& rhs)
  90. {
  91. base_type::operator=(rhs);
  92. return *this;
  93. }
  94. BOOST_FUSION_GPU_ENABLED
  95. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5)
  96. : base_type(arg0 , arg1 , arg2 , arg3 , arg4 , arg5) {}
  97. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
  98. BOOST_FUSION_GPU_ENABLED
  99. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5> const& rhs)
  100. : base_type(rhs) {}
  101. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
  102. BOOST_FUSION_GPU_ENABLED
  103. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5> const& rhs)
  104. {
  105. base_type::operator=(rhs);
  106. return *this;
  107. }
  108. BOOST_FUSION_GPU_ENABLED
  109. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6)
  110. : base_type(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6) {}
  111. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
  112. BOOST_FUSION_GPU_ENABLED
  113. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& rhs)
  114. : base_type(rhs) {}
  115. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
  116. BOOST_FUSION_GPU_ENABLED
  117. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6> const& rhs)
  118. {
  119. base_type::operator=(rhs);
  120. return *this;
  121. }
  122. BOOST_FUSION_GPU_ENABLED
  123. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7)
  124. : base_type(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7) {}
  125. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
  126. BOOST_FUSION_GPU_ENABLED
  127. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& rhs)
  128. : base_type(rhs) {}
  129. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
  130. BOOST_FUSION_GPU_ENABLED
  131. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7> const& rhs)
  132. {
  133. base_type::operator=(rhs);
  134. return *this;
  135. }
  136. BOOST_FUSION_GPU_ENABLED
  137. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8)
  138. : base_type(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8) {}
  139. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
  140. BOOST_FUSION_GPU_ENABLED
  141. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& rhs)
  142. : base_type(rhs) {}
  143. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
  144. BOOST_FUSION_GPU_ENABLED
  145. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8> const& rhs)
  146. {
  147. base_type::operator=(rhs);
  148. return *this;
  149. }
  150. BOOST_FUSION_GPU_ENABLED
  151. tuple(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9)
  152. : base_type(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9) {}
  153. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
  154. BOOST_FUSION_GPU_ENABLED
  155. tuple(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
  156. : base_type(rhs) {}
  157. template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
  158. BOOST_FUSION_GPU_ENABLED
  159. tuple& operator=(tuple<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9> const& rhs)
  160. {
  161. base_type::operator=(rhs);
  162. return *this;
  163. }
  164. template <typename T>
  165. BOOST_FUSION_GPU_ENABLED
  166. tuple& operator=(T const& rhs)
  167. {
  168. base_type::operator=(rhs);
  169. return *this;
  170. }
  171. BOOST_FUSION_GPU_ENABLED
  172. tuple& operator=(tuple const& rhs)
  173. {
  174. base_type::operator=(static_cast<base_type const&>(rhs));
  175. return *this;
  176. }
  177. template <typename U1, typename U2>
  178. BOOST_FUSION_GPU_ENABLED
  179. tuple& operator=(std::pair<U1, U2> const& rhs)
  180. {
  181. base_type::operator=(rhs);
  182. return *this;
  183. }
  184. };
  185. template <typename Tuple>
  186. struct tuple_size : result_of::size<Tuple> {};
  187. template <int N, typename Tuple>
  188. struct tuple_element : result_of::value_at_c<Tuple, N> {};
  189. template <int N, typename Tuple>
  190. BOOST_FUSION_GPU_ENABLED
  191. inline typename
  192. lazy_disable_if<
  193. is_const<Tuple>
  194. , result_of::at_c<Tuple, N>
  195. >::type
  196. get(Tuple& tup)
  197. {
  198. return at_c<N>(tup);
  199. }
  200. template <int N, typename Tuple>
  201. BOOST_FUSION_GPU_ENABLED
  202. inline typename result_of::at_c<Tuple const, N>::type
  203. get(Tuple const& tup)
  204. {
  205. return at_c<N>(tup);
  206. }
  207. }}