forked from boostorg/range
[range] small clarification in documentation for how to write a range adaptor
[SVN r82315]
This commit is contained in:
@ -147,7 +147,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<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>
|
||||
</tr></table>
|
||||
<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="special">}</span>
|
||||
</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>
|
||||
</ol></div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user