mirror of
https://github.com/boostorg/range.git
synced 2025-07-29 12:27:42 +02:00
[range] small clarification in documentation for how to write a range adaptor
[SVN r82315]
This commit is contained in:
@ -147,7 +147,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"><p><small>Last revised: January 02, 2013 at 07:48:08 GMT</small></p></td>
|
<td align="left"><p><small>Last revised: January 02, 2013 at 08:04:07 GMT</small></p></td>
|
||||||
<td align="right"><div class="copyright-footer"></div></td>
|
<td align="right"><div class="copyright-footer"></div></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -90,6 +90,12 @@
|
|||||||
<span class="keyword">const</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span> <span class="identifier">reversed</span> <span class="special">=</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span><span class="special">();</span>
|
<span class="keyword">const</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span> <span class="identifier">reversed</span> <span class="special">=</span> <span class="identifier">detail</span><span class="special">::</span><span class="identifier">reverse_forwarder</span><span class="special">();</span>
|
||||||
<span class="special">}</span>
|
<span class="special">}</span>
|
||||||
</pre>
|
</pre>
|
||||||
|
Note that this last step only applies if the adaptor takes no arguments.
|
||||||
|
If the adaptor takes arguments (such as <code class="computeroutput"><span class="identifier">indexed</span></code>),
|
||||||
|
then there is no need for a variable. Instead, give the tag type
|
||||||
|
a constructor that takes the arguments (and store those arguments
|
||||||
|
in the tag object). A usage of the adaptor will then involve construction
|
||||||
|
of an object of the tag type.
|
||||||
</li>
|
</li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -225,6 +225,10 @@ namespace
|
|||||||
const detail::reverse_forwarder reversed = detail::reverse_forwarder();
|
const detail::reverse_forwarder reversed = detail::reverse_forwarder();
|
||||||
}
|
}
|
||||||
``
|
``
|
||||||
|
Note that this last step only applies if the adaptor takes no arguments. If the adaptor takes arguments
|
||||||
|
(such as `indexed`), then there is no need for a variable. Instead, give the tag type a
|
||||||
|
constructor that takes the arguments (and store those arguments in the tag object). A usage
|
||||||
|
of the adaptor will then involve construction of an object of the tag type.
|
||||||
|
|
||||||
[endsect]
|
[endsect]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user