|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82326 - in trunk/libs/range/doc: html html/range/reference/extending/method_3 reference
From: zeratul976_at_[hidden]
Date: 2013-01-02 20:01:56
Author: nathanridge
Date: 2013-01-02 20:01:55 EST (Wed, 02 Jan 2013)
New Revision: 82326
URL: http://svn.boost.org/trac/boost/changeset/82326
Log:
[range] docs for writing adaptors: removed clarification added in r82315 (it was redundant); fixed typos that messed up numbering
Text files modified:
trunk/libs/range/doc/html/index.html | 2 +-
trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html | 6 ------
trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html | 31 ++++++++-----------------------
trunk/libs/range/doc/reference/extending.qbk | 8 --------
4 files changed, 9 insertions(+), 38 deletions(-)
Modified: trunk/libs/range/doc/html/index.html
==============================================================================
--- trunk/libs/range/doc/html/index.html (original)
+++ trunk/libs/range/doc/html/index.html 2013-01-02 20:01:55 EST (Wed, 02 Jan 2013)
@@ -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 23:39:56 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 03, 2013 at 00:57:19 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html
==============================================================================
--- trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html (original)
+++ trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_1.html 2013-01-02 20:01:55 EST (Wed, 02 Jan 2013)
@@ -90,12 +90,6 @@
<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>
Modified: trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html
==============================================================================
--- trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html (original)
+++ trunk/libs/range/doc/html/range/reference/extending/method_3/method_3_2.html 2013-01-02 20:01:55 EST (Wed, 02 Jan 2013)
@@ -80,15 +80,8 @@
</li>
<li class="listitem">
Implement a holder class to hold the arguments required to construct
- the RangeAdaptor.
- </li>
-</ol></div>
-<p>
- The holder combines multiple parameters into one that can be passed as
- the right operand of <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>.
- </p>
-<p>
-</p>
+ the RangeAdaptor. The holder combines multiple parameters into one
+ that can be passed as the right operand of <code class="computeroutput"><span class="keyword">operator</span><span class="special">|()</span></code>.
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">T</span><span class="special">></span>
<span class="keyword">class</span> <span class="identifier">replace_holder</span> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">holder2</span><span class="special"><</span><span class="identifier">T</span><span class="special">></span>
<span class="special">{</span>
@@ -100,23 +93,15 @@
<span class="keyword">void</span> <span class="keyword">operator</span><span class="special">=(</span><span class="keyword">const</span> <span class="identifier">replace_holder</span><span class="special">&);</span>
<span class="special">};</span>
</pre>
-<p>
- </p>
-<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ </li>
+<li class="listitem">
Define an instance of the holder with the name of the adaptor
- </li></ol></div>
-<p>
-</p>
<pre class="programlisting"><span class="keyword">static</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">forwarder2</span><span class="special"><</span><span class="identifier">replace_holder</span><span class="special">></span>
<span class="identifier">replaced</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">range_detail</span><span class="special">::</span><span class="identifier">forwarder2</span><span class="special"><</span><span class="identifier">replace_holder</span><span class="special">>();</span>
</pre>
-<p>
- </p>
-<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
+ </li>
+<li class="listitem">
Define <code class="computeroutput"><span class="keyword">operator</span><span class="special">|</span></code>
- </li></ol></div>
-<p>
-</p>
<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <span class="identifier">SinglePassRange</span><span class="special">></span>
<span class="keyword">inline</span> <span class="identifier">replace_range</span><span class="special"><</span><span class="identifier">SinglePassRange</span><span class="special">></span>
<span class="keyword">operator</span><span class="special">|(</span><span class="identifier">SinglePassRange</span><span class="special">&</span> <span class="identifier">rng</span><span class="special">,</span>
@@ -133,8 +118,8 @@
<span class="keyword">return</span> <span class="identifier">replace_range</span><span class="special"><</span><span class="keyword">const</span> <span class="identifier">SinglePassRange</span><span class="special">>(</span><span class="identifier">rng</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val1</span><span class="special">,</span> <span class="identifier">f</span><span class="special">.</span><span class="identifier">val2</span><span class="special">);</span>
<span class="special">}</span>
</pre>
-<p>
- </p>
+ </li>
+</ol></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: trunk/libs/range/doc/reference/extending.qbk
==============================================================================
--- trunk/libs/range/doc/reference/extending.qbk (original)
+++ trunk/libs/range/doc/reference/extending.qbk 2013-01-02 20:01:55 EST (Wed, 02 Jan 2013)
@@ -225,10 +225,6 @@
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]
@@ -285,9 +281,7 @@
``
# Implement a holder class to hold the arguments required to construct the RangeAdaptor.
-
The holder combines multiple parameters into one that can be passed as the right operand of `operator|()`.
-
``
template<typename T>
class replace_holder : public boost::range_detail::holder2<T>
@@ -302,14 +296,12 @@
``
# Define an instance of the holder with the name of the adaptor
-
``
static boost::range_detail::forwarder2<replace_holder>
replaced = boost::range_detail::forwarder2<replace_holder>();
``
# Define `operator|`
-
``
template<typename SinglePassRange>
inline replace_range<SinglePassRange>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk