forked from boostorg/range
[range] fixed #6212 (missing step in documentation for how to write a range adaptor)
[SVN r82314]
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 05:22:10 GMT</small></p></td>
|
||||
<td align="left"><p><small>Last revised: January 02, 2013 at 07:48:08 GMT</small></p></td>
|
||||
<td align="right"><div class="copyright-footer"></div></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
|
@ -81,6 +81,14 @@
|
||||
<span class="special">{</span>
|
||||
<span class="keyword">return</span> <span class="identifier">reverse_range</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">BidirectionalRng</span><span class="special">>(</span> <span class="identifier">r</span> <span class="special">);</span>
|
||||
<span class="special">}</span>
|
||||
</pre>
|
||||
</li>
|
||||
<li class="listitem">
|
||||
Declare the adaptor itself (it is a variable of the tag type).
|
||||
<pre class="programlisting"><span class="keyword">namespace</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>
|
||||
</pre>
|
||||
</li>
|
||||
</ol></div>
|
||||
|
@ -218,6 +218,14 @@ operator|( const BidirectionalRng& r, detail::reverse_forwarder )
|
||||
}
|
||||
``
|
||||
|
||||
# Declare the adaptor itself (it is a variable of the tag type).
|
||||
``
|
||||
namespace
|
||||
{
|
||||
const detail::reverse_forwarder reversed = detail::reverse_forwarder();
|
||||
}
|
||||
``
|
||||
|
||||
[endsect]
|
||||
|
||||
[section:method_3_2 Method 3.2: Implement a Range Adaptor with arguments]
|
||||
|
Reference in New Issue
Block a user