[range] fixed #6212 (missing step in documentation for how to write a range adaptor)

[SVN r82314]
This commit is contained in:
Nathan Ridge
2013-01-02 07:51:21 +00:00
parent 1d51c3afb2
commit 61979ff421
3 changed files with 17 additions and 1 deletions

View File

@ -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>

View File

@ -81,6 +81,14 @@
<span class="special">{</span>
<span class="keyword">return</span> <span class="identifier">reverse_range</span><span class="special">&lt;</span><span class="keyword">const</span> <span class="identifier">BidirectionalRng</span><span class="special">&gt;(</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>

View File

@ -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]