intrinsic_fwd.hpp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  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. ==============================================================================*/
  6. #if !defined(BOOST_FUSION_SEQUENCE_INTRINSIC_FWD_HPP_INCLUDED)
  7. #define BOOST_FUSION_SEQUENCE_INTRINSIC_FWD_HPP_INCLUDED
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/type_traits/is_const.hpp>
  10. #include <boost/utility/enable_if.hpp>
  11. #include <boost/fusion/support/is_sequence.hpp>
  12. namespace boost { namespace fusion
  13. {
  14. namespace extension
  15. {
  16. template <typename Tag>
  17. struct at_impl;
  18. template <typename Tag>
  19. struct begin_impl;
  20. template <typename Tag>
  21. struct empty_impl;
  22. template <typename Tag>
  23. struct end_impl;
  24. template <typename Tag>
  25. struct has_key_impl;
  26. template <typename Tag>
  27. struct segments_impl;
  28. template <typename Tag>
  29. struct size_impl;
  30. template <typename Tag>
  31. struct value_at_impl;
  32. template <typename Tag>
  33. struct at_key_impl;
  34. template <typename Tag>
  35. struct value_at_key_impl;
  36. }
  37. namespace result_of
  38. {
  39. template <typename Sequence, typename N>
  40. struct at;
  41. template <typename Sequence, int N>
  42. struct at_c;
  43. template <typename Sequence>
  44. struct back;
  45. template <typename Sequence>
  46. struct begin;
  47. template <typename Sequence>
  48. struct empty;
  49. template <typename Sequence>
  50. struct end;
  51. template <typename Sequence>
  52. struct front;
  53. template <typename Sequence, typename Key>
  54. struct has_key;
  55. template <typename Sequence>
  56. struct segments;
  57. template <typename Sequence>
  58. struct size;
  59. template <typename Sequence, typename N>
  60. struct value_at;
  61. template <typename Sequence, int N>
  62. struct value_at_c;
  63. template <typename Sequence, typename Key>
  64. struct at_key;
  65. template <typename Sequence, typename N>
  66. struct value_at_key;
  67. }
  68. template <typename N, typename Sequence>
  69. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  70. typename
  71. lazy_disable_if<
  72. is_const<Sequence>
  73. , result_of::at<Sequence, N>
  74. >::type
  75. at(Sequence& seq);
  76. template <typename N, typename Sequence>
  77. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  78. typename result_of::at<Sequence const, N>::type
  79. at(Sequence const& seq);
  80. template <int N, typename Sequence>
  81. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  82. typename
  83. lazy_disable_if<
  84. is_const<Sequence>
  85. , result_of::at_c<Sequence, N>
  86. >::type
  87. at_c(Sequence& seq);
  88. template <int N, typename Sequence>
  89. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  90. typename result_of::at_c<Sequence const, N>::type
  91. at_c(Sequence const& seq);
  92. template <typename Sequence>
  93. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  94. typename result_of::back<Sequence>::type
  95. back(Sequence& seq);
  96. template <typename Sequence>
  97. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  98. typename result_of::back<Sequence const>::type
  99. back(Sequence const& seq);
  100. template <typename Sequence>
  101. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  102. typename
  103. lazy_enable_if<
  104. traits::is_sequence<Sequence>
  105. , result_of::begin<Sequence>
  106. >::type const
  107. begin(Sequence& seq);
  108. template <typename Sequence>
  109. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  110. typename
  111. lazy_enable_if<
  112. traits::is_sequence<Sequence>
  113. , result_of::begin<Sequence const>
  114. >::type const
  115. begin(Sequence const& seq);
  116. template <typename Sequence>
  117. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  118. typename result_of::empty<Sequence>::type
  119. empty(Sequence const&);
  120. template <typename Sequence>
  121. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  122. typename
  123. lazy_enable_if<
  124. traits::is_sequence<Sequence>
  125. , result_of::end<Sequence>
  126. >::type const
  127. end(Sequence& seq);
  128. template <typename Sequence>
  129. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  130. typename
  131. lazy_enable_if<
  132. traits::is_sequence<Sequence>
  133. , result_of::end<Sequence const>
  134. >::type const
  135. end(Sequence const& seq);
  136. template <typename Sequence>
  137. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  138. typename result_of::front<Sequence>::type
  139. front(Sequence& seq);
  140. template <typename Sequence>
  141. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  142. typename result_of::front<Sequence const>::type
  143. front(Sequence const& seq);
  144. template <typename Key, typename Sequence>
  145. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  146. typename result_of::has_key<Sequence, Key>::type
  147. has_key(Sequence const& seq);
  148. template <typename Sequence>
  149. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  150. typename
  151. lazy_disable_if<
  152. is_const<Sequence>
  153. , result_of::segments<Sequence>
  154. >::type
  155. segments(Sequence& seq);
  156. template <typename Sequence>
  157. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  158. typename result_of::segments<Sequence const>::type
  159. segments(Sequence const& seq);
  160. template <typename Sequence>
  161. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  162. typename result_of::size<Sequence>::type
  163. size(Sequence const&);
  164. template <typename Key, typename Sequence>
  165. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  166. typename
  167. lazy_disable_if<
  168. is_const<Sequence>
  169. , result_of::at_key<Sequence, Key>
  170. >::type
  171. at_key(Sequence& seq);
  172. template <typename Key, typename Sequence>
  173. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  174. typename result_of::at_key<Sequence const, Key>::type
  175. at_key(Sequence const& seq);
  176. }}
  177. #endif