iterator.xml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2012 Eric Niebler
  4. Distributed under the Boost
  5. Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. -->
  8. <header name="boost/proto/functional/std/iterator.hpp">
  9. <para>Includes Proto callables for the functions found in the standard <code>&lt;iterator&gt; header</code>.</para>
  10. <namespace name="boost">
  11. <namespace name="proto">
  12. <namespace name="functional">
  13. <!-- proto::functional::advance -->
  14. <struct name="advance">
  15. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  16. <code>std::advance()</code> function on its arguments.</purpose>
  17. <description>
  18. <para>
  19. A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  20. <code>std::advance()</code> function on its arguments.</para>
  21. </description>
  22. <inherit>
  23. <type><classname>proto::callable</classname></type>
  24. </inherit>
  25. <typedef name="result_type">
  26. <type>void</type>
  27. </typedef>
  28. <method-group name="public member functions">
  29. <method name="operator()" cv="const">
  30. <type>void</type>
  31. <template>
  32. <template-type-parameter name="InputIterator"/>
  33. </template>
  34. <template>
  35. <template-type-parameter name="Distance"/>
  36. </template>
  37. <parameter name="x">
  38. <paramtype>InputIterator &amp;</paramtype>
  39. </parameter>
  40. <parameter name="n">
  41. <paramtype>Distance</paramtype>
  42. </parameter>
  43. <description>
  44. <para>Calls <code>std::advance(x, n)</code></para>
  45. </description>
  46. </method>
  47. </method-group>
  48. </struct>
  49. <!-- proto::functional::distance -->
  50. <struct name="distance">
  51. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  52. <code>std::distance()</code> function on its arguments.</purpose>
  53. <description>
  54. <para>
  55. A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  56. <code>std::distance()</code> function on its arguments.</para>
  57. </description>
  58. <inherit>
  59. <type><classname>proto::callable</classname></type>
  60. </inherit>
  61. <struct-specialization name="result">
  62. <template>
  63. <template-type-parameter name="This"/>
  64. <template-type-parameter name="InputIterator"/>
  65. </template>
  66. <specialization>
  67. <template-arg>This(InputIterator, InputIterator)</template-arg>
  68. </specialization>
  69. <typedef name="type">
  70. <type>typename std::iterator_traits&lt;
  71. typename boost::remove_const&lt;
  72. typename boost::remove_reference&lt;InputIterator&gt;::type
  73. &gt;::type
  74. &gt;::difference_type</type>
  75. </typedef>
  76. </struct-specialization>
  77. <method-group name="public member functions">
  78. <method name="operator()" cv="const">
  79. <type>void</type>
  80. <template>
  81. <template-type-parameter name="InputIterator"/>
  82. </template>
  83. <parameter name="first">
  84. <paramtype>InputIterator</paramtype>
  85. </parameter>
  86. <parameter name="last">
  87. <paramtype>InputIterator</paramtype>
  88. </parameter>
  89. <returns>
  90. <para><code>std::distance(first, last)</code></para>
  91. </returns>
  92. </method>
  93. </method-group>
  94. </struct>
  95. <!-- proto::functional::next -->
  96. <struct name="next">
  97. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  98. <code>std::next()</code> function on its arguments.</purpose>
  99. <description>
  100. <para>
  101. A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  102. <code>std::next()</code> function on its arguments.</para>
  103. </description>
  104. <inherit>
  105. <type><classname>proto::callable</classname></type>
  106. </inherit>
  107. <struct-specialization name="result">
  108. <template>
  109. <template-type-parameter name="This"/>
  110. <template-type-parameter name="ForwardIterator"/>
  111. </template>
  112. <specialization>
  113. <template-arg>This(ForwardIterator)</template-arg>
  114. </specialization>
  115. <typedef name="type">
  116. <type>typename boost::remove_const&lt;
  117. typename boost::remove_reference&lt;ForwardIterator&gt;::type
  118. &gt;::type</type>
  119. </typedef>
  120. </struct-specialization>
  121. <struct-specialization name="result">
  122. <template>
  123. <template-type-parameter name="This"/>
  124. <template-type-parameter name="ForwardIterator"/>
  125. <template-type-parameter name="Distance"/>
  126. </template>
  127. <specialization>
  128. <template-arg>This(ForwardIterator, Distance)</template-arg>
  129. </specialization>
  130. <typedef name="type">
  131. <type>typename boost::remove_const&lt;
  132. typename boost::remove_reference&lt;ForwardIterator&gt;::type
  133. &gt;::type</type>
  134. </typedef>
  135. </struct-specialization>
  136. <method-group name="public member functions">
  137. <method name="operator()" cv="const">
  138. <type>void</type>
  139. <template>
  140. <template-type-parameter name="ForwardIterator"/>
  141. </template>
  142. <parameter name="x">
  143. <paramtype>ForwardIterator</paramtype>
  144. </parameter>
  145. <returns>
  146. <para><code>std::next(x)</code></para>
  147. </returns>
  148. </method>
  149. <method name="operator()" cv="const">
  150. <type>void</type>
  151. <template>
  152. <template-type-parameter name="ForwardIterator"/>
  153. </template>
  154. <parameter name="x">
  155. <paramtype>ForwardIterator</paramtype>
  156. </parameter>
  157. <parameter name="n">
  158. <paramtype>typename std::iterator_traits&lt;ForwardIterator&gt;::difference_type</paramtype>
  159. </parameter>
  160. <returns>
  161. <para><code>std::next(x, n)</code></para>
  162. </returns>
  163. </method>
  164. </method-group>
  165. </struct>
  166. <!-- proto::functional::prior -->
  167. <struct name="prior">
  168. <purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  169. <code>std::prior()</code> function on its arguments.</purpose>
  170. <description>
  171. <para>
  172. A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes the
  173. <code>std::prior()</code> function on its arguments.</para>
  174. </description>
  175. <inherit>
  176. <type><classname>proto::callable</classname></type>
  177. </inherit>
  178. <struct-specialization name="result">
  179. <template>
  180. <template-type-parameter name="This"/>
  181. <template-type-parameter name="BidirectionalIterator"/>
  182. </template>
  183. <specialization>
  184. <template-arg>This(BidirectionalIterator)</template-arg>
  185. </specialization>
  186. <typedef name="type">
  187. <type>typename boost::remove_const&lt;
  188. typename boost::remove_reference&lt;BidirectionalIterator&gt;::type
  189. &gt;::type</type>
  190. </typedef>
  191. </struct-specialization>
  192. <struct-specialization name="result">
  193. <template>
  194. <template-type-parameter name="This"/>
  195. <template-type-parameter name="BidirectionalIterator"/>
  196. <template-type-parameter name="Distance"/>
  197. </template>
  198. <specialization>
  199. <template-arg>This(BidirectionalIterator, Distance)</template-arg>
  200. </specialization>
  201. <typedef name="type">
  202. <type>typename boost::remove_const&lt;
  203. typename boost::remove_reference&lt;BidirectionalIterator&gt;::type
  204. &gt;::type</type>
  205. </typedef>
  206. </struct-specialization>
  207. <method-group name="public member functions">
  208. <method name="operator()" cv="const">
  209. <type>void</type>
  210. <template>
  211. <template-type-parameter name="BidirectionalIterator"/>
  212. </template>
  213. <parameter name="x">
  214. <paramtype>BidirectionalIterator</paramtype>
  215. </parameter>
  216. <returns>
  217. <para><code>std::prior(x)</code></para>
  218. </returns>
  219. </method>
  220. <method name="operator()" cv="const">
  221. <type>void</type>
  222. <template>
  223. <template-type-parameter name="BidirectionalIterator"/>
  224. </template>
  225. <parameter name="x">
  226. <paramtype>BidirectionalIterator</paramtype>
  227. </parameter>
  228. <parameter name="n">
  229. <paramtype>typename std::iterator_traits&lt;BidirectionalIterator&gt;::difference_type</paramtype>
  230. </parameter>
  231. <returns>
  232. <para><code>std::prior(x, n)</code></para>
  233. </returns>
  234. </method>
  235. </method-group>
  236. </struct>
  237. </namespace>
  238. </namespace>
  239. </namespace>
  240. </header>