Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82315 - in trunk/libs/range/doc: html html/range/reference/extending/method_3 reference
From: zeratul976_at_[hidden]
Date: 2013-01-02 03:05:31


Author: nathanridge
Date: 2013-01-02 03:05:30 EST (Wed, 02 Jan 2013)
New Revision: 82315
URL: http://svn.boost.org/trac/boost/changeset/82315

Log:
[range] small clarification in documentation for how to write a range adaptor
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/reference/extending.qbk | 4 ++++
   3 files changed, 11 insertions(+), 1 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 03:05:30 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 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>

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 03:05:30 EST (Wed, 02 Jan 2013)
@@ -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>

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 03:05:30 EST (Wed, 02 Jan 2013)
@@ -225,6 +225,10 @@
     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]
 


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