Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2008-07-16 15:55:15


Author: nesotto
Date: 2008-07-16 15:55:14 EDT (Wed, 16 Jul 2008)
New Revision: 47481
URL: http://svn.boost.org/trac/boost/changeset/47481

Log:
Minor doc update
Text files modified:
   trunk/libs/assign/doc/index.html | 32 ++++++++++++++++++++++++--------
   1 files changed, 24 insertions(+), 8 deletions(-)

Modified: trunk/libs/assign/doc/index.html
==============================================================================
--- trunk/libs/assign/doc/index.html (original)
+++ trunk/libs/assign/doc/index.html 2008-07-16 15:55:14 EDT (Wed, 16 Jul 2008)
@@ -37,7 +37,7 @@
             <li>Function list_of()
             <li>Function map_list_of()
             <li>Function tuple_list_of()
- <li>Functions repeat(), repeat_fun() and range()
+ <li>Functions repeat(), repeat_fun() and range()
             <li>Functions ref_list_of() and cref_list_of()
             <li>A "complicated" example
             <li>Functions <a href="#ptr_push_back"><code>ptr_push_back(), ptr_push_front()</code>,
@@ -51,7 +51,7 @@
         <li>Standard containers </li>
         <li>Functions list_of() and map_list_of()</li>
         <li>Functions <a href="#repeat_ref"><code>repeat()</code>,
- <code>repeat_fun()</code> and <code>range()</code> </a> </li>
+ <code>repeat_fun()</code> and <code>range()</code> </a> </li>
         <li>Class list_inserter</li>
         <li>Function make_list_inserter()</li>
         <li> Customizing argument list sizes</li>
@@ -285,7 +285,15 @@
  Please notice that <code>list_of()</code> can even convert to a
  <code>boost::<a
 href="../../array/index.html">array</a>&lt;T,sz></code> and see also the list
-of supported libraries .
+of supported libraries . </p>
+ <p>
+ Note that the type returned by
+ <code>list_of()</code> (and its variants) has overloaded comparison operators. This allows you to
+ write test code such as
+ <code>
+ BOOST_CHECK_EQUAL( my_container, list_of(2)(3)(4)(5) );.
+ </code>
+ </p>
  
  <h3>Function <code>map_list_of()</code> <a name="map_list_of"></h3>
  This function is defined for pure convenience when working with
@@ -720,8 +728,8 @@
         <li>Standard containers </li>
         <li>Functions list_of() and map_list_of()</li>
         <li>Functions <a href="#repeat_ref"><code>repeat()</code>,<code>repeat_fun()</code> and
- <code>range()</code>
- </a></li>
+ <code>range()</code>
+ </a></li>
         <li>Class list_inserter</li>
         <li>Function make_list_inserter()</li>
         <li>Customizing argument list sizes </li>
@@ -926,9 +934,17 @@
         //
         </span><span class=keyword>template</span><span class=special>&lt; </span><span class=keyword>template </span><span class=special>&lt;</span><span class=keyword>class</span><span class=special>,</span><span class=identifier>std</span><span class=special>::</span><span class=identifier>size_t</span><span class=special>&gt; </span><span class=keyword>class </span><span class=identifier>Array</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U</span><span class=special>, </span><span class=identifier>std</span><span class=special>::</span><span class=identifier>size_t </span><span class=identifier>sz </span><span class=special>&gt;
         </span><span class=keyword>operator </span><span class=identifier>Array</span><span class=special>&lt;</span><span class=identifier>U</span><span class=special>,</span><span class=identifier>sz</span><span class=special>&gt;() </span><span class=keyword>const</span><span class=special>;
- </span><span class=special>};
+ </span><span class=special>};</span>
     
- </span><span class=keyword>template</span><span class=special>&lt; </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>&gt;
+ <span class=comment>//
+ // Comparison operators. 'op' can be &lt;,&gt;,&lt;=,&gt;=,==,!=
+ //</span>
+ <span class=keyword>template</span><span class=special>&lt;</span> <span class=keyword>class</span> <span class=identifier>Range</span> <span class=special>&gt;</span>
+ <span class=keyword>bool</span> <span class=identifier>op</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>Implementation</span><span class=special>-</span><span class=identifier>defined</span><span class=special>&amp;,</span> <span class=keyword>const</span> <span class=identifier>Range</span><span class=special>&amp;</span> <span class=special>);</span>
+ <span class=keyword>template</span><span class=special>&lt;</span> <span class=keyword>class</span> <span class=identifier>Range</span> <span class=special>&gt;</span>
+ <span class=keyword>bool</span> <span class=identifier>op</span><span class=special>(</span> <span class=keyword>const</span> <span class=identifier>Range</span><span class=special>&amp;,</span> <span class=keyword>const</span> <span class=identifier>Implementation</span><span class=special>-</span><span class=identifier>defined</span><span class=special>&amp;</span> <span class=special>);</span>
+
+ <span class=keyword>template</span><span class=special>&lt; </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>&gt;
     </span><span class=identifier>Implementation</span><span class=special>-</span><span class=identifier>defined</span> </span><span class=identifier>list_of</span><span class=special>(</span><span class=special>);
 
     </span><span class=keyword>template</span><span class=special>&lt; </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>&gt;
@@ -969,7 +985,7 @@
           <li> the argument list of <code>repeat_fun()</code> is <code>(std::size_t,Nullary_function)</code>
       </ul>
       
- </p>
+ </p>
   <p>
   The function <code>range()</code> only exists as a member function. The following two overloads are provided:
   <blockquote>


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