1 | /*============================================================================= |
2 | Copyright (c) 2001-2011 Joel de Guzman |
3 | |
4 | Distributed under the Boost Software License, Version 1.0. (See accompanying |
5 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | ==============================================================================*/ |
7 | #if !defined(BOOST_FUSION_SEQUENCE_INTRINSIC_FWD_HPP_INCLUDED) |
8 | #define BOOST_FUSION_SEQUENCE_INTRINSIC_FWD_HPP_INCLUDED |
9 | |
10 | #include <boost/fusion/support/config.hpp> |
11 | #include <boost/type_traits/is_const.hpp> |
12 | #include <boost/utility/enable_if.hpp> |
13 | #include <boost/fusion/support/is_sequence.hpp> |
14 | |
15 | namespace boost { namespace fusion |
16 | { |
17 | namespace extension |
18 | { |
19 | template <typename Tag> |
20 | struct at_impl; |
21 | |
22 | template <typename Tag> |
23 | struct begin_impl; |
24 | |
25 | template <typename Tag> |
26 | struct empty_impl; |
27 | |
28 | template <typename Tag> |
29 | struct end_impl; |
30 | |
31 | template <typename Tag> |
32 | struct has_key_impl; |
33 | |
34 | template <typename Tag> |
35 | struct segments_impl; |
36 | |
37 | template <typename Tag> |
38 | struct size_impl; |
39 | |
40 | template <typename Tag> |
41 | struct value_at_impl; |
42 | |
43 | template <typename Tag> |
44 | struct at_key_impl; |
45 | |
46 | template <typename Tag> |
47 | struct value_at_key_impl; |
48 | } |
49 | |
50 | namespace result_of |
51 | { |
52 | template <typename Sequence, typename N> |
53 | struct at; |
54 | |
55 | template <typename Sequence, int N> |
56 | struct at_c; |
57 | |
58 | template <typename Sequence> |
59 | struct back; |
60 | |
61 | template <typename Sequence> |
62 | struct begin; |
63 | |
64 | template <typename Sequence> |
65 | struct empty; |
66 | |
67 | template <typename Sequence> |
68 | struct end; |
69 | |
70 | template <typename Sequence> |
71 | struct front; |
72 | |
73 | template <typename Sequence, typename Key> |
74 | struct has_key; |
75 | |
76 | template <typename Sequence> |
77 | struct segments; |
78 | |
79 | template <typename Sequence> |
80 | struct size; |
81 | |
82 | template <typename Sequence, typename N> |
83 | struct value_at; |
84 | |
85 | template <typename Sequence, int N> |
86 | struct value_at_c; |
87 | |
88 | template <typename Sequence, typename Key> |
89 | struct at_key; |
90 | |
91 | template <typename Sequence, typename N> |
92 | struct value_at_key; |
93 | } |
94 | |
95 | template <typename N, typename Sequence> |
96 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
97 | typename |
98 | lazy_disable_if< |
99 | is_const<Sequence> |
100 | , result_of::at<Sequence, N> |
101 | >::type |
102 | at(Sequence& seq); |
103 | |
104 | template <typename N, typename Sequence> |
105 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
106 | typename result_of::at<Sequence const, N>::type |
107 | at(Sequence const& seq); |
108 | |
109 | template <int N, typename Sequence> |
110 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
111 | typename |
112 | lazy_disable_if< |
113 | is_const<Sequence> |
114 | , result_of::at_c<Sequence, N> |
115 | >::type |
116 | at_c(Sequence& seq); |
117 | |
118 | template <int N, typename Sequence> |
119 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
120 | typename result_of::at_c<Sequence const, N>::type |
121 | at_c(Sequence const& seq); |
122 | |
123 | template <typename Sequence> |
124 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
125 | typename result_of::back<Sequence>::type |
126 | back(Sequence& seq); |
127 | |
128 | template <typename Sequence> |
129 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
130 | typename result_of::back<Sequence const>::type |
131 | back(Sequence const& seq); |
132 | |
133 | template <typename Sequence> |
134 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
135 | typename |
136 | lazy_enable_if< |
137 | traits::is_sequence<Sequence> |
138 | , result_of::begin<Sequence> |
139 | >::type const |
140 | begin(Sequence& seq); |
141 | |
142 | template <typename Sequence> |
143 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
144 | typename |
145 | lazy_enable_if< |
146 | traits::is_sequence<Sequence> |
147 | , result_of::begin<Sequence const> |
148 | >::type const |
149 | begin(Sequence const& seq); |
150 | |
151 | template <typename Sequence> |
152 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
153 | typename result_of::empty<Sequence>::type |
154 | empty(Sequence const&); |
155 | |
156 | template <typename Sequence> |
157 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
158 | typename |
159 | lazy_enable_if< |
160 | traits::is_sequence<Sequence> |
161 | , result_of::end<Sequence> |
162 | >::type const |
163 | end(Sequence& seq); |
164 | |
165 | template <typename Sequence> |
166 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
167 | typename |
168 | lazy_enable_if< |
169 | traits::is_sequence<Sequence> |
170 | , result_of::end<Sequence const> |
171 | >::type const |
172 | end(Sequence const& seq); |
173 | |
174 | template <typename Sequence> |
175 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
176 | typename result_of::front<Sequence>::type |
177 | front(Sequence& seq); |
178 | |
179 | template <typename Sequence> |
180 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
181 | typename result_of::front<Sequence const>::type |
182 | front(Sequence const& seq); |
183 | |
184 | template <typename Key, typename Sequence> |
185 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
186 | typename result_of::has_key<Sequence, Key>::type |
187 | has_key(Sequence const& seq); |
188 | |
189 | template <typename Sequence> |
190 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
191 | typename |
192 | lazy_disable_if< |
193 | is_const<Sequence> |
194 | , result_of::segments<Sequence> |
195 | >::type |
196 | segments(Sequence& seq); |
197 | |
198 | template <typename Sequence> |
199 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
200 | typename result_of::segments<Sequence const>::type |
201 | segments(Sequence const& seq); |
202 | |
203 | template <typename Sequence> |
204 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
205 | typename result_of::size<Sequence>::type |
206 | size(Sequence const&); |
207 | |
208 | template <typename Key, typename Sequence> |
209 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
210 | typename |
211 | lazy_disable_if< |
212 | is_const<Sequence> |
213 | , result_of::at_key<Sequence, Key> |
214 | >::type |
215 | at_key(Sequence& seq); |
216 | |
217 | template <typename Key, typename Sequence> |
218 | BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED |
219 | typename result_of::at_key<Sequence const, Key>::type |
220 | at_key(Sequence const& seq); |
221 | }} |
222 | |
223 | #endif |
224 | |