1 <?xml version=
"1.0" encoding=
"utf-8"?>
3 Copyright 2012 Eric Niebler
5 Distributed under the Boost
6 Software License, Version 1.0. (See accompanying
7 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 <header name=
"boost/proto/functional/std/iterator.hpp">
10 <para>Includes Proto callables for the functions found in the standard
<code><iterator
> header
</code>.
</para>
12 <namespace name=
"boost">
13 <namespace name=
"proto">
14 <namespace name=
"functional">
16 <!-- proto::functional::advance -->
17 <struct name=
"advance">
18 <purpose>A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
19 <code>std::advance()
</code> function on its arguments.
</purpose>
22 A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
23 <code>std::advance()
</code> function on its arguments.
</para>
26 <type><classname>proto::callable
</classname></type>
28 <typedef name=
"result_type">
31 <method-group name=
"public member functions">
32 <method name=
"operator()" cv=
"const">
35 <template-type-parameter name=
"InputIterator"/>
38 <template-type-parameter name=
"Distance"/>
41 <paramtype>InputIterator
&</paramtype>
44 <paramtype>Distance
</paramtype>
47 <para>Calls
<code>std::advance(x, n)
</code></para>
53 <!-- proto::functional::distance -->
54 <struct name=
"distance">
55 <purpose>A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
56 <code>std::distance()
</code> function on its arguments.
</purpose>
59 A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
60 <code>std::distance()
</code> function on its arguments.
</para>
63 <type><classname>proto::callable
</classname></type>
65 <struct-specialization name=
"result">
67 <template-type-parameter name=
"This"/>
68 <template-type-parameter name=
"InputIterator"/>
71 <template-arg>This(InputIterator, InputIterator)
</template-arg>
74 <type>typename std::iterator_traits
<
75 typename boost::remove_const
<
76 typename boost::remove_reference
<InputIterator
>::type
78 >::difference_type
</type>
80 </struct-specialization>
81 <method-group name=
"public member functions">
82 <method name=
"operator()" cv=
"const">
85 <template-type-parameter name=
"InputIterator"/>
87 <parameter name=
"first">
88 <paramtype>InputIterator
</paramtype>
90 <parameter name=
"last">
91 <paramtype>InputIterator
</paramtype>
94 <para><code>std::distance(first, last)
</code></para>
100 <!-- proto::functional::next -->
102 <purpose>A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
103 <code>std::next()
</code> function on its arguments.
</purpose>
106 A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
107 <code>std::next()
</code> function on its arguments.
</para>
110 <type><classname>proto::callable
</classname></type>
112 <struct-specialization name=
"result">
114 <template-type-parameter name=
"This"/>
115 <template-type-parameter name=
"ForwardIterator"/>
118 <template-arg>This(ForwardIterator)
</template-arg>
120 <typedef name=
"type">
121 <type>typename boost::remove_const
<
122 typename boost::remove_reference
<ForwardIterator
>::type
125 </struct-specialization>
126 <struct-specialization name=
"result">
128 <template-type-parameter name=
"This"/>
129 <template-type-parameter name=
"ForwardIterator"/>
130 <template-type-parameter name=
"Distance"/>
133 <template-arg>This(ForwardIterator, Distance)
</template-arg>
135 <typedef name=
"type">
136 <type>typename boost::remove_const
<
137 typename boost::remove_reference
<ForwardIterator
>::type
140 </struct-specialization>
141 <method-group name=
"public member functions">
142 <method name=
"operator()" cv=
"const">
145 <template-type-parameter name=
"ForwardIterator"/>
148 <paramtype>ForwardIterator
</paramtype>
151 <para><code>std::next(x)
</code></para>
154 <method name=
"operator()" cv=
"const">
157 <template-type-parameter name=
"ForwardIterator"/>
160 <paramtype>ForwardIterator
</paramtype>
163 <paramtype>typename std::iterator_traits
<ForwardIterator
>::difference_type
</paramtype>
166 <para><code>std::next(x, n)
</code></para>
172 <!-- proto::functional::prior -->
173 <struct name=
"prior">
174 <purpose>A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
175 <code>std::prior()
</code> function on its arguments.
</purpose>
178 A
<conceptname>PolymorphicFunctionObject
</conceptname> type that invokes the
179 <code>std::prior()
</code> function on its arguments.
</para>
182 <type><classname>proto::callable
</classname></type>
184 <struct-specialization name=
"result">
186 <template-type-parameter name=
"This"/>
187 <template-type-parameter name=
"BidirectionalIterator"/>
190 <template-arg>This(BidirectionalIterator)
</template-arg>
192 <typedef name=
"type">
193 <type>typename boost::remove_const
<
194 typename boost::remove_reference
<BidirectionalIterator
>::type
197 </struct-specialization>
198 <struct-specialization name=
"result">
200 <template-type-parameter name=
"This"/>
201 <template-type-parameter name=
"BidirectionalIterator"/>
202 <template-type-parameter name=
"Distance"/>
205 <template-arg>This(BidirectionalIterator, Distance)
</template-arg>
207 <typedef name=
"type">
208 <type>typename boost::remove_const
<
209 typename boost::remove_reference
<BidirectionalIterator
>::type
212 </struct-specialization>
213 <method-group name=
"public member functions">
214 <method name=
"operator()" cv=
"const">
217 <template-type-parameter name=
"BidirectionalIterator"/>
220 <paramtype>BidirectionalIterator
</paramtype>
223 <para><code>std::prior(x)
</code></para>
226 <method name=
"operator()" cv=
"const">
229 <template-type-parameter name=
"BidirectionalIterator"/>
232 <paramtype>BidirectionalIterator
</paramtype>
235 <paramtype>typename std::iterator_traits
<BidirectionalIterator
>::difference_type
</paramtype>
238 <para><code>std::prior(x, n)
</code></para>