|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61563 - in sandbox/statistics/detail/assign: boost/assign boost/assign/auto_size/check boost/assign/auto_size/reference_wrapper libs/assign/doc libs/assign/example libs/assign/src
From: erwann.rogard_at_[hidden]
Date: 2010-04-25 21:48:13
Author: e_r
Date: 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
New Revision: 61563
URL: http://svn.boost.org/trac/boost/changeset/61563
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size.hpp | 1
sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_l.hpp | 1
sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_r.hpp | 2
sandbox/statistics/detail/assign/boost/assign/auto_size/check/example2.hpp | 12
sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp | 1
sandbox/statistics/detail/assign/boost/assign/chain.hpp | 4
sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt | 2
sandbox/statistics/detail/assign/libs/assign/doc/index.html | 917 ++++++++++++++++++++-------------------
sandbox/statistics/detail/assign/libs/assign/example/range.cpp | 1
sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 4
10 files changed, 491 insertions(+), 454 deletions(-)
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -13,5 +13,6 @@
#include <boost/assign/auto_size/ref_rebind_list_of.hpp>
#include <boost/assign/auto_size/ref_csv.hpp>
#include <boost/assign/auto_size/ref_rebind_csv.hpp>
+#include <boost/assign/auto_size/range/chain.hpp>
#endif
\ No newline at end of file
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_l.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_l.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_l.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -12,7 +12,6 @@
#include <boost/typeof/typeof.hpp>
#include <boost/range/algorithm/copy.hpp>
#include <boost/assign/auto_size/range/chain_l.hpp>
-#include <boost/assign/auto_size/range/chain.hpp>
#include <boost/assign/auto_size/check/iterator.hpp>
#include <boost/assign/auto_size/check/constants.hpp>
#include <boost/assign/auto_size/check/copy_iterator.hpp>
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_r.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_r.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain_r.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -11,7 +11,7 @@
#include <boost/array.hpp>
#include <boost/typeof/typeof.hpp>
#include <boost/range/algorithm/copy.hpp>
-#include <boost/assign/auto_size/range/chain.hpp>
+#include <boost/assign/auto_size/range/chain_common.hpp>
#include <boost/assign/auto_size/range/chain_r.hpp>
#include <boost/assign/auto_size/check/iterator.hpp>
#include <boost/assign/auto_size/check/constants.hpp>
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/example2.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/example2.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/example2.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -11,7 +11,7 @@
#include <vector>
#include <iterator>
#include <boost/range/algorithm/copy.hpp>
-#include <boost/assign/auto_size/range/chain.hpp>
+#include <boost/assign/auto_size/range/chain_r.hpp>
#define BOOST_ASSIGN_AS_CHECK_example2 \
{ \
@@ -19,14 +19,12 @@
std::vector<int> v, v2; \
v = BOOST_ASSIGN_AS_CHECK_cref3(1,2,3); \
boost::copy( \
- chain_r( \
- BOOST_ASSIGN_AS_CHECK_cref1(0) \
- )( v )( v )( BOOST_ASSIGN_AS_CHECK_cref1(4) ), \
+ BOOST_ASSIGN_AS_CHECK_cref1(0) && v && v && BOOST_ASSIGN_AS_CHECK_cref1(4),\
std::back_inserter(v2) \
); \
BOOST_ASSIGN_CHECK_EQUAL( v2.size() , 8u ); \
boost::copy( \
- chain_r(v2)(BOOST_ASSIGN_AS_CHECK_cref1(5)), \
+ v2 && BOOST_ASSIGN_AS_CHECK_cref1(5), \
std::back_inserter(v) \
); \
BOOST_ASSIGN_CHECK_EQUAL( v.size() , 12u ); \
@@ -34,9 +32,7 @@
int y = 1; \
BOOST_ASSIGN_CHECK_EQUAL( \
boost::size( \
- chain_r( \
- BOOST_ASSIGN_AS_CHECK_cref1( x ) \
- )( v2 )( BOOST_ASSIGN_AS_CHECK_cref1( y ) ) \
+ BOOST_ASSIGN_AS_CHECK_cref1( x ) && v2 && BOOST_ASSIGN_AS_CHECK_cref1( y )\
), \
10u \
); \
Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -86,7 +86,6 @@
l.swap( r );
}
-
}// detail
}// assign
}// boost
Modified: sandbox/statistics/detail/assign/boost/assign/chain.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/chain.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/chain.hpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -9,6 +9,8 @@
#ifndef BOOST_ASSIGN_CHAIN_ER_2010_HPP
#define BOOST_ASSIGN_CHAIN_ER_2010_HPP
-#include <boost/assign/auto_size/range/chain.hpp>
+// TODO : remove
+
+//#include <boost/assign/auto_size/range/chain.hpp>
#endif
\ No newline at end of file
Modified: sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/compilers_tested.txt 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -1,5 +1,5 @@
Platform Compiler Boost version Date Tested Compiles Assertions Comment
-Mac OS X 10.6 gcc 4.2 boost_1_41_0 March 25th, 2010 15/15 15/15 warning: comparison between signed and unsigned integer expressions
+Mac OS X 10.6 gcc 4.2 boost_1_41_0 April 25th, 2010 15/15 15/15 warning: comparison between signed and unsigned integer expressions
Ubuntu 9.10 gcc 4.4 boost_1_41_0 March 25th, 2010 15/15 15/15 warning: comparison between signed and unsigned integer expressions
Win7-32 V6.1.7100 Mingw/GCC 3.4.2 boost_1_41_0 March 25th, 2010 15/15 10/15 Reference wrappers seem to contain garbage.
Win7-32 V6.1.7100 MSVC 2008 Version - Express edition boost_1_41_0 March 28th, 2010 15/15 15/15
Modified: sandbox/statistics/detail/assign/libs/assign/doc/index.html
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/index.html (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/index.html 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -39,7 +39,7 @@
<li>Function map_list_of()
<li>Function tuple_list_of()
<li>Functions repeat()
, repeat_fun()
and range()
- <li>Functions chain_l()
and chain_r()
+ <li>Function operator &&
<li>Functions ref_list_of()
, cref_list_of()
and variants
<li>Functions ref_csv()
, cref_csv()
and variants
<li>A "complicated" example
@@ -47,14 +47,8 @@
<a href="#ptr_push_back"><code>ptr_insert()</code></a> and <a href="#ptr_push_back"><code>ptr_map_insert()</code></a>
<li>Function ptr_list_of()
</ul>
- <li> Design </li>
- <ul>
- <li>Proxy objects</li>
- <li>Auto-size</li>
- </ul>
-
<li>
- Reference for functions and operators
+ Functions and operators
<ul>
<li>Headers </li>
<li>Functions list_of()
, map_list_of()
and ref_list_of<int>()
</li>
@@ -65,22 +59,30 @@
<li>Functions repeat()
, repeat_fun()
and
<a href="#ref-repeat"><code>range()</code>
</a></li>
- <li>Functions chain_l()
and chain_r()
</li>
+ <li>Operator &&
</li>
<li>Customizing argument list sizes </li>
</ul>
- <li>
- Reference for the implementation
+ <li> Concepts </li>
+ <ul>
+ <li> Concept AnonymousList
</li>
+ <li> Concept AutoSize
</li>
+ <li> Concept Converter
</li>
+ <li> Concept RangeComparable
</li>
+ <li> Concept RangeExtensible
</li>
+ <li> Concept RefWrapper
</li>
+ <li> Concept RefArray
</li>
+ <li> Concept Repeatable
</li>
+ </ul>
+
+ <li> Proxy objects </li>
<ul>
- <li> Proxy object converter<>
</li>
- <li> Proxy object generic_list<>
</li>
- <li> Proxy object list_inserter<>
</li>
+ <li> Proxy object generic_list<>
</li>
+ <li> Proxy object list_inserter<>
</li>
<li> Proxy object static_generic_list<>
</li>
- <li> Proxy object range_comparison_op::base_of<>
</li>
- <li> Proxy object array_interface<>
</li>
- <li> Proxy object chain_impl::expr<>
</li>
- <li> Proxy object expr<>
</li>
- <li> Proxy object lazy_array<>
</li>
- <li> Proxy object static_array<>
</li>
+ <li> Proxy object chain_impl_l<>
</li>
+ <li> Proxy object chain_impl_r<>
</li>
+ <li> Proxy object expr<>
</li>
+ <li> Proxy object static_array<>
</li>
</ul>
<li> Exceptions and exception-safety </li>
<li> Extending the library</li>
@@ -92,8 +94,6 @@
<li> References</li>
</ul>
<hr>
-
-
<h2><a name="intro">Introduction</a></h2> <p> <i>There appear to be few
practical uses of <code>operator,()</code></i>. <!-- p. 247 --> <br><b>Bjarne
@@ -164,7 +164,7 @@
<li>Function map_list_of()
<li>Function tuple_list_of()
<li>Functions repeat()
, repeat_fun()
and range()
- <li>Functions chain_l()
and chain_r()
+ <li>Function operator&&
<li>Functions ref_list_of()
, cref_list_of()
and variants
<li>Functions ref_csv()
, cref_csv()
and variants
<li>A "complicated" example
@@ -198,7 +198,6 @@
expression is convertible to the <code>value_type</code> of the container.
</p>
-
<h3>Function <code>operator()()</code> <a name="operator()"></h3>
<p>
We do not call <code>operator()()</code> directly, but instead we call a
@@ -496,26 +495,24 @@
</p>
-<h3>Functions <code>chain_l()</code> and <code>chain_r()</code><a name="chain"></h3>
+<h3>Operator <code>&&</code><a name="chain"></h3>
While the function range()
works in combination with functions
such as list_of()
, it is not compatible with
<a href="#ref_csv"><code>ref_csv()</code></a>, <a href="#ref_list"><code>ref_list_of()</code></a> and their variants,
-which are part of a different framework. The functions <code>chain_l()</code>,
-and <code>chain_r()</code> achieve a similar goal and have the same interface as list_of()
. Continuing the example above,
+which are part of a different framework. The function <code>operator&&</code>,
+achieves a similar goal by chaining ranges at compile time, which is typically the faster option.
+Continuing the example above,
<blockquote><pre><span class=preprocessor>#include</span> <span class=special><</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>assign</span><span class=special>/</span><span class=identifier>auto_size</span><span class=special>/</span><span class=identifier>chain</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>></span>
<span class=preprocessor>#include</span> <span class=special><</span><span class=identifier>boost</span><span class=special>/</span><span class=identifier>assign</span><span class=special>/</span><span class=identifier>auto_size</span><span class=special>/</span><span class=identifier>ref_list_of</span><span class=special>.</span><span class=identifier>hpp</span><span class=special>></span>
<span class=special>{</span>
- <span class=identifier>BOOST_ASSERT</span><span class=special>(
- </span><span class=identifier>chain_r</span><span class=special>( </span></span><span class=identifier>ref_list_of</span>( </span><span class=identifier>x</span><span class=special> )</span><span class=special> )</span><span class=special>( </span><span class=identifier>v2</span><span class=special> )( </span><span class=identifier>ref_list_of</span>(</span><span class=identifier>y</span><span class=special>)</span> <span class=special>)</span><span class=special>.</span><span class=identifier>size</span><span class=special>(</span><span class=special>)</span><span class=special> == </span><span class=number>10u</span><span class=special> )</span><span class=special>;</span>
+ <span class=identifier>BOOST_ASSERT</span><span class=special>(</span> <span class=special>(</span> <span class=identifier>cref_list_of</span>( </span><span class=identifier>x</span><span class=special> )</span><span class=special>&&</span><span class=identifier> v2</span><span class=special> && </span><span class=identifier>cref_list_of</span>(</span><span class=identifier> y </span><span class=special>)</span> <span class=special>)</span><span class=special>.</span><span class=identifier>size</span><span class=special>(</span><span class=special>)</span><span class=special> == </span><span class=number>10u</span><span class=special> )</span><span class=special>;</span>
<span class=special>}</span></pre>
</blockquote>
-Notice the suffix 'r' which tells the function that the arguments should be treated as rvalues. The reference is here.
-
<h3>Functions <code>ref_list_of()</code>, <code>cref_list_of()</code> and variants<a name="ref_list_of"></h3>
When you need to create an anonymous range of values and speed is essential,
@@ -772,8 +769,8 @@
</p>
<hr>
+
<h2><a name="design">Design</a></h2>
- <h3><a name="proxy-objects">Proxy objects</a></h3>
<p>
This section explains the way the library is implemented.
@@ -828,21 +825,11 @@
The functions, operators and their proxy objects are by defaut in namespace <code>boost::assign</code>.
</p>
- <h3><a name="auto_size">Auto-size</a></h3>
-
- <p> This section is about proxy objects that are in <code>boost::assign::detail::auto_size</code>. The functions
- that return them, however, ref_list_of()
, ref_csv()
- and their variants, operate under the same principle as those in the rest of this library and are therefore in namespace <code>boost::assign</code>.
- Compile time expressions are formed from references to passed argument, which frees the user from the need to specify the
- size of the collection explicitly.
- </p>
-
- <h2>Reference for functions and operators <a name="ref-functions"> </h3>
+ <h2>Functions and operators <a name="ref-functions"> </h2>
<h3>Contents</h3>
<ul>
-
<li>Headers </li>
<li>Functions list_of()
, map_list_of()
and ref_list_of<int>()
</li>
<li>Function make_list_inserter()
</li>
@@ -852,14 +839,13 @@
<li>Functions repeat()
, repeat_fun()
and
<a href="#ref-repeat"><code>range()</code>
</a></li>
- <li>Functions chain_l()
and chain_r()
</li>
+ <li>Operator &&
</li>
<li>Customizing argument list sizes </li>
</ul>
<h3>Headers <a name="ref-function-headers"></h3>
- <p>
- Please notice <code><boost/assign/list_inserter.hpp></code> is included for each header that defines <code>operator+=()</code>.</p>
+ <p>Please notice <code><boost/assign/list_inserter.hpp></code> is included for each header that defines <code>operator+=()</code>.</p>
<table cellpadding=5 border=1 > <tr>
<th> Header </th>
@@ -867,10 +853,13 @@
<tr>
<td> <boost/assign.hpp> </td>
<td> everything except support for pointer containers </td>
+ <tr>
+ <td> <boost/assign/auto_size.hpp> </td>
+ <td> All functions return auto-size proxy objects. </td>
<tr>
- <td> <boost/assign/auto_size/range/chain.hpp> </td>
- <td> chain_l()
and chain_r()
+ <td> <boost/assign/auto_size/range/chain_operator.hpp> </td>
+ <td> operator&&
<tr>
<td> <boost/assign/auto_size/ref_csv.hpp> </td>
@@ -888,20 +877,14 @@
<a href="#ref_list_of"><code>cref_rebind_list_of()</code></a> </td>
<tr>
<td> <boost/assign/list_of.hpp> </td>
- <td> list_of()
, <a
-href="#map_list_of">map_list_of()</code></a>,
- tuple_list_of(),
- ref_list_of<int>()
and
-ref_list_of<int>()
-
+ <td>
+ list_of()
, map_list_of(),
+ tuple_list_of(), ref_list_of<int>()
</td> <tr>
<td> <boost/assign/std.hpp> </td>
- <td> operator+=()
for all
-standard
-containers (see below)</td> <tr> <td> <boost/assign/std/deque.hpp> </td>
- <td> <code>operator+=()</code> for
- <code>std::deque</code>, <code><deque></code>
+ <td> operator+=()
for all standard containers (see below)</td> <tr> <td> <boost/assign/std/deque.hpp> </td>
+ <td> <code>operator+=()</code> for <code>std::deque</code>, <code><deque></code>
<tr>
<td> <boost/assign/std/list.hpp> </td>
<td> <code>operator+=()</code> for
@@ -974,24 +957,123 @@
</p>
- <h3>Functions <code>list_of()</code>,
- <code>map_list_of()</code> and <code>ref_list_of<int>()</code> <a name=ref-list_of> </h3>
- <p>
- The first two functions are used to construct anonymous list which can be converted to any standard container
- and <code>boost::array<T,sz>.</code> Specifically, the
- object returned by the two functions is generic_list<>
.
- The third function can be used to construct an anonymous list of references. The corresponding proxy object is
- static_generic_list<>
. In the auto-size
- framework there are <a href="#ref-ref_list_of">overloads<a> for this function, that deduce the number of arguments at compile time.
+ <h3><a name=ref-list_of>Function <code>list_of()</code></a></h3>
+
+ <h4>Template parameters</h4>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><td><tt>T</tt></td><td>Element</td></tr>
+ </table>
+ </blockquote>
+
+ <h4>Usage</h4>
+
+ <p>Let <code>U</code> be either of <code>T</code> or <code>const T</code>, and <code>d</code> an instance thereof. </p>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><tt>list_of( d )</tt></td> <td>generic_list
<code><U></code></td></tr>
+ </table>
+ </blockquote>
+
+ <h4>Synopsis</h4>
+
+ <blockquote>
+ <pre><span class=keyword>namespace </span><span class=identifier>boost </span>
+<span class=special>{</span>
+<span class=keyword>namespace </span><span class=identifier>assign</span>
+<span class=special>{</span>
+
+ <span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>>
+ </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>< </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>>
+ </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=identifier>T </span><span class=identifier>t </span><span class=special>);
+
+ </span><span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>T</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U2 </span><span class=special>>
+ </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=identifier>U </span><span class=identifier>u</span><span class=special>, </span><span class=identifier>U2 </span><span class=identifier>u2 </span><span class=special>);
+
+ </span><span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>T</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U2</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U3 </span><span class=special>>
+ </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=identifier>U </span><span class=identifier>u</span><span class=special>, </span><span class=identifier>U2 </span><span class=identifier>u2</span><span class=special>, </span><span class=identifier>U3 </span><span class=identifier>u3 </span><span class=special>);
+
+ </span><span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>T</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U2</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U3</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U4 </span><span class=special>>
+ </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=identifier>U </span><span class=identifier>u</span><span class=special>, </span><span class=identifier>U2 </span><span class=identifier>u2</span><span class=special>, </span><span class=identifier>U3 </span><span class=identifier>u3</span><span class=special>, </span><span class=identifier>U4 </span><span class=identifier>u4 </span><span class=special>);
+
+ </span><span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>T</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U2</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U3</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U4</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>U5 </span><span class=special>>
+ </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=identifier>U </span><span class=identifier>u</span><span class=special>, </span><span class=identifier>U2 </span><span class=identifier>u2</span><span class=special>, </span><span class=identifier>U3 </span><span class=identifier>u3</span><span class=special>, </span><span class=identifier>U4 </span><span class=identifier>u4</span><span class=special>, </span><span class=identifier>U5 </span><span class=identifier>u5 </span><span class=special>);
+
+ </span><span class=keyword>template</span><span class=special>< </span><span class=keyword>class </span><span class=identifier>Key</span><span class=special>, </span><span class=keyword>class </span><span class=identifier>T </span><span class=special>>
+ </span><span class=identifier>Implementation</span><span class=special>-</span><span class=identifier>defined</span> </span><span class=identifier>map_list_of</span><span class=special>( </span><span class=identifier>Key </span><span class=identifier>k</span><span class=special>, </span><span class=identifier>T </span><span class=identifier>t </span><span class=special>)
+ </span><span class=special>{
+ </span><span class=keyword>return </span><span class=identifier>list_of</span><span class=special>< </span><span class=identifier>std</span><span class=special>::</span><span class=identifier>pair</span><span class=special><</span><span class=identifier>Key</span><span class=special>,</span><span class=identifier>T</span><span class=special>> </span><span class=special>>()( </span><span class=identifier>k</span><span class=special>, </span><span class=identifier>t </span><span class=special>);
+ </span><span class=special>}</span>
+
+<span class=special>} </span><span class=comment>// namespace 'assign'</span>
+<span class=special>} </span><span class=comment>// namespace 'boost'</span> </pre></blockquote>
+
+
+ <h3><a name=ref-map_list_of>Function <code>map_list_of()</code></a></h3>
+
+ <h4>Template parameters</h4>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Parameter</th> <th class="head">Description</th>
+ <tr><td><tt>K</tt></td><td>A key type</td></tr>
+ <tr><td><tt>T</tt></td><td>A data type</td></tr>
+ </table>
+ </blockquote>
+
+ <h4>Usage</h4>
+
+ <p>Let <code>k</code> and <code>d</code> denote instances of <code>const K</code> and <code>const T</code>, respectively. </p>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><tt>map_list_of( k, d )</tt></td> <td>generic_list
<code><std::pair<const K, const T > ></code></td></tr>
+ </table>
+ </blockquote>
+
+
+ <h3><a name=ref-ref_list_of_int>Function <code>ref_list_of<int>()</code></a></h3>
+
+ <p> This function has been superseded.</p>
+
+ <h4>Template parameters</h4>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Parameter</th> <th class="head">Description</th>
+ <tr><td><tt>N</tt></td><td>An integer</td></tr>
+ <tr><td><tt>T</tt></td><td>Element</td></tr>
+ </table>
+ </blockquote>
+
+ <b>Usage</b>
+
+ <p>Let <code>U</code> be either <code>T</code> or <code>const T</code> and <code>d</code> an object of type <code>U</code>.
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><tt>ref_list_of<int>(d)</tt></td> <td>static_generic_list
<code><U,></code></td></tr>
+ </table>
+ </blockquote>
<h3><a name="ref-make_list_inserter">Function <code>make_list_inserter()</code></a></h3>
+
<p>
A simple "constructor" function for <code>list_inserter</code>. A typical
use of this function is to call it with the result of
<code>boost::bind()</code>
which in general returns some unreadable and weird class template.
</p>
+
<b>Synopsis</b>
+
<blockquote><pre>
<span class=keyword>namespace </span><span class=identifier>boost </span>
<span class=special>{</span>
@@ -1009,7 +1091,7 @@
<h3>Functions <code>ref_list_of()</code>,
<code>cref_list_of()</code> and variants <a name=ref-ref_list_of> </h3>
- <b>Template parameters</b>
+ <h4>Template parameters</h4>
<blockquote>
<table cellpadding=5 border=1>
@@ -1019,39 +1101,36 @@
</table>
</blockquote>
- <b>Usage</b>
+ <h4>Usage</h4>
<p>Let <code>d1</code> and <code>d2</code> denote objects of type <code>T</code> and <code>const T</code>, respectively.</p>
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Result type</th>
- <tr><td><tt>ref_list_of<P>(d1)</tt></td><td> expr<tt><top_,T,1,ref_copy,P></tt></td></tr>
- <tr><td><tt>cref_list_of<P>(d2)</tt></td><td> expr<tt><top_,const T,1,ref_copy,P></tt></td></tr>
- <tr><td><tt>ref_list_of(d1)</tt></td><td> expr<tt><top_,T,1,ref_copy,default_policy></tt></td></tr>
- <tr><td><tt>cref_list_of(d2)</tt></td><td> expr<tt><top_,const T,1,ref_copy,default_policy></tt></td></tr>
+ <tr><th class="head">Expression</th> <th class="head">Result</th><th class="head">Description</th>
+ <tr><td><tt>ref_list_of<P>( d1 ) </tt></td><td> expr<_,T,1,assign_reference_copy,P></tt><tt></td></tr>
+ <tr><td><tt>cref_list_of<P>( d2 )</tt></td><td> expr<_,const T,1,assign_reference_copy,P></tt><tt></td></tr>
+ <tr><td><tt>ref_list_of( d1 ) </tt></td><td> expr<_,T,1,assign_reference_copy,use_default></tt><tt></td></tr>
+ <tr><td><tt>cref_list_of( d2 ) </tt></td><td> expr<_,const T,1,assign_reference_copy,use_default></tt><tt></td></tr>
</table>
</blockquote>
-<p>
-Usage for the related functions <code>ref_rebind_list_of()</code> and <code>cref_rebind_list_of()</code> are identical to those
-above, except the fourth argument to expr<> is a reference wrapper with rebind semantics, <code>ref_rebind</code>.
-</p>
+
+ <p>Usage for the related functions <code>ref_rebind_list_of()</code> and <code>cref_rebind_list_of()</code> are identical to those
+ above, except the fourth argument to expr<> is assign_reference_copy. </p>
- <h3>Functions <code>ref_csv()</code>,
- <code>cref_csv()</code> and variants <a name=ref-ref_csv> </h3>
+ <h3>Functions <code>ref_csv()</code>, <code>cref_csv()</code> and variants <a name=ref-ref_csv> </h3>
- <b>Template parameters</b>
+ <h4>Template parameters</h4>
<blockquote>
<table cellpadding=5 border=1>
<tr><th class="head">Parameter</th> <th class="head">Description</th>
<tr><td><tt>P</tt></td><td>A policy tag</td></tr>
<tr><td><tt>T</tt></td><td>Element</td></tr>
- <tr><td><tt>U</tt></td><td><tt>T</tt> or <tt>const T</tt></td></tr>
<tr><td><tt>N</tt></td><td>Size</td></tr>
- <tr><td><tt>R</tt></td><td>A Reference wrapper</td></tr>
</table>
</blockquote>
+<!--
<b>Associated types</b>
<blockquote>
@@ -1061,28 +1140,27 @@
<tr><td><tt>csv_policy<default_policy>::apply<U,N,R>::type</tt></td><td> static_array<tt><T,N,R></tt></td><td><tt>Impl0<U,N,R></tt></td></tr>
</table>
</blockquote>
+-->
- <b>Usage</b>
+ <h4>Usage</h4>
<p>Let <code>ai</code> and <code>bi</code> denote the <tt>i</tt>-th element of size-<tt>N</tt> sequences of objects of type <code>T</code> and <code>const T</code>,
respectively</p>
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Result type</th>
- <tr><td><tt>ref_csv<P>(a1,...,aN)</tt></td><td><tt>Impl<P,T,N,ref_copy></tt></td></tr>
- <tr><td><tt>cref_csv<P>(b1,...,bN)</tt></td><td><tt>Impl<P,const T,N,ref_copy></tt></td></tr>
- <tr><td><tt>ref_csv(a1,...,aN)</tt></td><td><tt>Impl0<T,N,ref_copy></tt></td></tr>
- <tr><td><tt>cref_csv(b1,...,bN)</tt></td><td><tt>Impl0<const T,N,ref_copy></tt></td></tr>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><tt>ref_csv<P>(a1,...,aN)</tt></td><td>A custom implementation</td></tr>
+ <tr><td><tt>cref_csv<P>(b1,...,bN)</tt></td><td>A custom implementation </td></tr>
+ <tr><td><tt>ref_csv(a1,...,aN)</tt></td><td> static_array<tt><T,N,assign_reference_copy></tt> </td></tr>
+ <tr><td><tt>cref_csv(b1,...,bN)</tt></td><td> static_array<tt><const T,N,assign_reference_copy></tt></td> </tr>
</table>
</blockquote>
<p>
Usage for the related functions <code>ref_rebind_list_of()</code> and <code>cref_rebind_list_of()</code> are identical to those
-above, and their result type are modified by replacing <code>ref_copy</code> by <code>ref_rebind</code>.
+above but with rebind rather than copy semantics.
</p>
-<p>
-The maximum number of arguments to a csv function is <code>BOOST_ASSIGN_CSV_SIZE</code>.
-</p>
+<p>The maximum number of arguments to a csv function is <code>BOOST_ASSIGN_CSV_SIZE</code>.</p>
<h3><a name="ref-std">Operator <code>+=</code> for standard containers </a> </h3>
<p> In the following three dots (...) will mean
@@ -1166,304 +1244,322 @@
</p>
- <h3> Functions <code>chain_l()</code> and <code>chain_r()<a name="ref-chain"> </h3>
+ <h3> <a name="ref-chain">Operator <code>&&</code></a> </h3>
- <p> This function serves as a sustitute for range()
- within the auto-size framework.
-
- <p> <b>Template parameters</b> </p>
+ <h4>Template parameters</h4>
<blockquote>
<table cellpadding=5 border=1>
<tr><th class="head">Parameter</th> <th class="head">Description</th>
- <tr><td><tt>L</tt></td><td>Implementation defined</td></tr>
- <tr><td><tt>E</tt></td><td>Implementation defined</td></tr>
- <tr><td><tt>V</tt></td><td>A value type</td></tr>
- <tr><td><tt>R</tt></td><td>A reference type</td></tr>
- <tr><td><tt>Rng</tt></td><td>A range type</td></tr>
- <tr><td><tt>add_const</tt></td><td>A boolean value</td></tr>
+ <tr><td><tt>R1</tt></td><td>Models Range</td></tr>
+ <tr><td><tt>R2</tt></td><td>Models Range</td></tr>
</table>
</blockquote>
- <b>Associated types</b>
+ <h4>Requirements</h4>
+
+ There exists some type <tt>T</tt> such that for each of <tt>R = R1, R2</tt>,
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Description<th class="head">Alias</th>
- <tr><td><tt>chain_impl::expr<L,E,true,V,R,add_const></tt></td><td>Implementation</td><td>Impl<></td></tr>
+ <tr><th class="head">Parameter</th> <th class="head">Description</th>
+ <tr><td><tt>boost::range_reference<R>::type</tt></td><td>Convertible to <tt>T</tt></td></tr>
</table>
</blockquote>
- <b>Usage</b>
- <p>Let <code>r</code> instance of <code>Rng</code>
+In particular, elements modeling RefWrapper<tt>(T)</tt> are allowed.
+
+ <h4>Usage</h4>
+ <p>Let <code>r1</code>, <code>r2</code>, denote instances of <code>R1</code>, and <code>const R2</code>.
+ Let <code>s1</code> and <code>s2</code> of type <code>R1</code>, and <code>R2</code>, respectively,
+ such that at least one of them is <code>const</code>.
<blockquote>
<table cellpadding=5 border=1>
<tr><th class="head">Expression</th> <th class="head">Result</th>
- <tr><td><tt>chain_l<V,R>(r)</tt></td><td> Impl<>
</td></tr>
- <tr><td><tt>chain_l<V,use_default>(r)</tt></td><td> Impl<>
</td></tr>
- <tr><td><tt>chain_l(r)</tt></td><td> Impl<>
</td></tr>
+ <tr><td><tt>r1 && r2</tt></td><td> result_of::chain_l
<code><R1,R2>::type</code> </td></tr>
+ <tr><td><tt>s1 && s2</tt></td><td> result_of::chain_r
<code><R1,R2>::type</code> </td></tr>
</table>
</blockquote>
+
+ <h4> Fine control </h4>
+
+ Let <tt>T1</tt> and <tt>T2</tt> each be <tt>const</tt> or non-<tt>const</tt> without restriction.
+ For finer control over the resulting proxy objects, one may call <tt>chain_l<V,R>(r1)(r2)</tt> or <tt>chain_l(r1)(r2)</tt>, where
+<tt>V</tt> is a value type, and <tt>R</tt> a reference type, and similarly <tt>chain_r<V,R>(t1)(t2)</tt> or
+<tt>chain_r(t1)(t2)</tt>.
+
+ <h2>Concepts <a name="concepts"> </h2>
- <h2>Reference for the implementation <a name="ref-impl"> </h2>
- Proxy objects are those that are returned by <a name="ref-functions">functions<a>, which are
- invisible to their caller, and take care of the implementation.
<h3>Contents</h3>
<ul>
- <li> Proxy object converter<>
</li>
- <li> Proxy object generic_list<>
</li>
- <li> Proxy object list_inserter<>
</li>
- <li> Proxy object static_generic_list<>
</li>
- <li> Proxy object range_comparison_op::base_of<>
</li>
- <li> Proxy object array_interface<>
</li>
- <li> Proxy object expr<>
</li>
- <li> Proxy object lazy_array<>
</li>
- <li> Proxy object static_array<>
</li>
- <li> Proxy objects chain_impl::expr<>
</li>
+ <li> Concept AnonymousList
</li>
+ <li> Concept AutoSize
</li>
+ <li> Concept Chainable
</li>
+ <li> Concept Converter
</li>
+ <li> Concept RangeComparable
</li>
+ <li> Concept RangeExtensible
</li>
+ <li> Concept RefWrapper
</li>
+ <li> Concept RefArray
</li>
+ <li> Concept Repeatable
</li>
</ul>
- <h3>Proxy object <code>converter<></code><a name=ref-converter> </h3>
- <b>Header</b> <code><boost/assign/list_of.hpp></code>
+ <h3>Concept <a name="concept-ano_list"><tt>AnonymousList</tt></a></h3>
+
+ <p>For now <tt>AnonymousList</tt> is still a loose concept (once an acceptable formalization is found,
+ this doc will be updated accordingly). Its distinguishing feature, however, is that it exposes
+ public member functions to <i>internally</i> grow a list of a given type, <tt>T</tt>.</p>
+
+ <p>How the internal list is accessible publically is not part of the concept. It needs to be
+ specified separately, such as <tt>AnonymousList</tt>+Range</p>
- <p>
- <b>Template parameters</b>
- </p>
+ <h3>Concept <a name="concept-auto_size"><tt>Auto-Size</tt></a></h3>
+
+ <p>For now <tt>Auto-Size</tt> list is still a loose concept (once an acceptable formalization is found,
+ this doc will be updated accordingly). Its distinguishing feature, is that it is a compile time expression
+ that is formed from references to passed argument, which may be faster than runtime alternatives, and frees the user from the need to specify the size of
+ the resulting collection.</p>
+
+ <h3>Concept <a name="concept-chainable"><tt>Chainable</tt></a></h3>
+
+ <h4>Notation</h4>
+
+ Let <tt>c</tt> model <tt>Chainable</tt> for value type <tt>T</tt>, and <tt>r</tt> model
+ Range each element of
+ which is convertible to <tt>T</tt>.
+
+ <h4>Refinement of</h4>
+
+ Models Range.
+
+ <h4>Requirements</h4>
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Parameter</th> <th class="head">Description</th>
- <tr><td><tt>D</tt></td><td> A derived class </td> </tr>
- <tr><td><tt>I</tt></td><td> An iterator </td> </tr>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><span class="pre"><tt>c && r</tt></span></td><td>Models <tt>Range</tt> and is equivalent to <tt>c</tt> and <tt>r</tt> concatenated</td> </tr>
</table>
</blockquote>
-<p>
- In the tables below, let <code>d</code> and object of type <code>const D</code>.
-</p>
- <b>Requirements on the derived type</b>
+ <h3>Concept <a name="concept-ref_wrapper"><tt>RefWrapper</tt></a></h3>
+
+ <h4>Headers</h4>
+ </p> <code><boost/assign/list_of.hpp></code> <p>
+ </p> <code><boost/assign/auto_size/reference_wrapper/copy.hpp></code> <p>
+ </p> <code><boost/assign/auto_size/reference_wrapper/rebind.hpp></code> <p>
+
+ <h4>Notation</h4>
+
+ Let <tt>R</tt> model <tt>RefWrapper</tt> for value type <tt>T</tt>, and <tt>r</tt> an instance thereof.
+ Let <tt>x</tt> denote an object of type <tt>T</tt>.
+
+ <h4>Requirements</h4>
+
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Return</th>
- <tr><td><tt><span class="pre">d.begin()</span></tt></td> <td>An iterator of type <tt><span class=identifier>I</span></tt></td></tr>
- <tr><td><tt><span class="pre">d.end()</span></tt></td><td>An iterator of type <tt><span class=identifier>I</span></tt></td> </tr>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><span class="pre"><tt>r</tt></span></td><td>convertible to <tt>T&</tt></td> </tr>
</table>
</blockquote>
- <b>Requirements on the conversion operands</b>
-</p>
- There are three concepts that allow for conversion which we call container, adapters, and arrays. Let <code>C</code>,
- <code>A</code> and <code>R</code> denote models of the respective concepts,
- and <code>c</code>, <code>a</code> and <code>r</code>, instances thereof. Let <code>b</code> and <code>e</code> denote the begin and end iterators of <code>d</code>,
- and <tt>n</tt> their distance. Assume that the elements of each of these data-structures
- are of type <code>X</code>, of which <code>x</code> is and instance, and <code>k</code> <i>any</i> index in the range <tt>[<span class=number>0</span>,n)</tt>.
-
- Each of <code>c</code>, <code>a</code> and <code>r</code> must be copy constructible. In addition,
+ <h4> <a name="concept-ref_wrapper_assign">Assignment semantics </a></h4>
+
<blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Effect</th>
- <tr><td><tt><span class="pre">C c(b,e);</span></tt></td> <td>Constructs an object of type <tt><span class=identifier>C</span></tt></td></tr>
- <tr><td><tt><span class="pre">a.push(x)</span></tt></td><td>Adds element <tt><span class=identifier>x</span></tt> to <tt><span class=identifier>a</span></tt></td> </tr>
- <tr><td><tt><span class="pre">r[k]=x</span></tt></td><td>Assigns value <tt><span class=identifier>x</span></tt> to the kth element of <tt><span class=identifier>r</span></tt> </tt></td> </tr>
+ <tr><th class="head">Concept</th><th class="head">Expression</th> <th class="head">Post-condition</th><th class="head">Model</th> </tr>
+ <tr><td> <tt>Copy</tt> </td><td><span class="pre"><tt>r = x; T& y = r; </tt></span></td><td><tt> x == y</tt></td> <td><code>assign_reference_copy</code></td></tr>
+ <tr><td> <tt>Rebind</tt> </td><td><span class="pre"><tt>r = x; T& y = r; </tt></span></td><td><tt>&x == &y</tt></td> <td><code>assign_reference</code>, <code>assign_reference_rebind</code></td></tr>
</table>
</blockquote>
-</p>
- <b>Synopsis</b>
- <blockquote>
+ <h3>Concept <a name="concept-converter"><tt>Converter</tt></a></h3>
- <pre>
-<span class=keyword>namespace </span><span class=identifier>boost</span>
-<span class=special>{</span>
-<span class=keyword>namespace </span><span class=identifier>assign</span>
-<span class=special>{
+ <h4>Headers</h4>
+ </p> <code><boost/assign/list_of.hpp></code> <p>
+ </p> <code><boost/assign/auto_size/range/converter.hpp></code> <p>
+
+ <h4>Refinement of</h4>
- <span class=keyword>template</span>< <span class=keyword>class</span> <span class=identifier>D</span>, <span class=keyword>class</span> <span class=identifier>I</span> >
- <span class=keyword>class</span> converter
- {
- <span class=keyword>public:</span>
- <span class=keyword>typedef</span> <span class=identifier>I</span> iterator;
- <span class=keyword>typedef</span> <span class=identifier>I</span> const_iterator;
-
- iterator begin() <span class=keyword>const</span>;
+ <p>Range</p>
- iterator end() <span class=keyword>const</span>;
-
- <span class=keyword>template</span>< <span class=keyword>class</span> Container >
- Container convert_to_container();
-
- <span class=keyword>template</span>< <span class=keyword>class</span> Container >
- Container to_container( Container& c );
+ <h4>Notation</h4>
+ <p>Let <code>V1</code>, <code>V2</code> and <code>V3</code> denote three classes, each of whose interface captures a valid conversion operand for <tt>Converter</tt>,
+ that we call <i>container</i>, <i>adapter</i>, and <i>indexable</i>. Let <code>v1</code>, <code>v2</code> and <code>v3</code>, instances thereof. Let <tt>C</tt> denote
+ a class that models <tt>Converter</tt>, and <tt>c</tt> and instance thereof.
+ Let <code>b</code> and <code>e</code> denote the begin and end iterators of <tt>c</tt>, and <tt>n</tt> the distance between them. Assume that the elements of each
+ of these data-structures are of type <code>X</code>, of which <code>x</code> is and instance, and <code>k</code> <i>any</i> index in the range
+ <tt>[<span class=number>0</span>,n)</tt>.
+ </p>
+
+ <h4>Conversion operands</h4>
- adapter_converter to_adapter() <span class=keyword>const</span>
+ Each of <code>v1</code>, <code>v2</code> and <code>v3</code> must be copy constructible.
+ In addition,
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Concept</th><th class="head">Expression</th> <th class="head">Effect</th>
+ <tr><td>Container</td><td><tt><span class="pre">V1 v1(b,e);</span></tt></td> <td>Constructs an object of type <tt><span class=identifier>V</span></tt></td></tr>
+ <tr><td>Adapter</td><td><tt><span class="pre">v2.push(x)</span></tt></td><td>Adds element <tt><span class=identifier>x</span></tt> to <tt><span class=identifier>a</span></tt></td> </tr>
+ <tr><td>Indexable</td><td><tt><span class="pre">v3[k] = x</span></tt></td><td>Assigns value <tt><span class=identifier>x</span></tt> to the kth element of <tt><span class=identifier>r</span></tt> </tt></td> </tr>
+ </table>
+ </blockquote>
+</p>
- <span class=keyword>template</span>< <span class=keyword>class</span> Adapter >
- Adapter to_adapter( Adapter& a ) <span class=keyword>const</span>
+ <h4>Requirements</h4>
+
+ For each of <tt>v</tt> in <tt><span class="pre">{v1,v3}</span></tt>, these are valid expressions whose effect is to assign/copy the content of the rhs to the lhs:
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Expression</th>
+ <tr><td><tt><span class="pre">v = c;</span></tt></td> </tr>
+ <tr><td><tt><span class="pre">v = c.convert_to_container();</span></tt></td> </tr>
+ <tr><td><tt><span class="pre">v2 = c.to_adapter()</span></tt></td> </tr>
+ </table>
+ </blockquote>
- <span class=keyword>template</span>< <span class=keyword>class</span> Array >
- Array to_array( Array& a ) <span class=keyword>const</span>;
- };
+ <h4> Models </h4>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>==( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
+ A proxy-object models this concept by inheriting from <tt>converter<></tt> or by expanding the macro
+ <code>BOOST_ASSIGN_AS_CONVERTER</code> inside its definition.
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>==( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
+ <h3><a name="concept-ref_array">Concept <code>RefArray</code><a></h3>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>!=( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
-
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>!=( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
+ <h4>Header</h4> <code><boost/assign/auto_size/array/interface.hpp></code>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span><( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
+ <h4>Requirements</h4>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span><( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
+ A <tt>RefArray</tt> for value type <tt>T</tt> and size <tt>N</tt> exposes the interface of
+ <a href="http://www.boost.org/doc/libs/release/libs/array/"><code>boost::array<></code><a>,
+ each element of which models RefWrapper for value type <tt>T</tt>.
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>>( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
+ <h4> Models </h4>
+
+ Any object of type <tt>D</tt> inheriting publicly from <code>range_comparison_op::base_of<D></code>.
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>>( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
+ <h3><a name="concept-range_comparable">Concept <tt>RangeComparable</tt><a></h3>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span><=( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
+ <h4>Headers</h4>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span><=( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
-
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>>=( <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& l, <span class=keyword>const</span> Range& r );
+ </p> <code><boost/assign/list_of.hpp></code> <p>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Range >
- bool <span class=keyword>operator</span>>=( <span class=keyword>const</span> Range& l, <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
+ <h4>Notation</h4>
- <span class=keyword>template</span>< <span class=keyword>class</span> D, <span class=keyword>class</span> <span class=identifier>I</span>, <span class=keyword>class</span> Elem, <span class=keyword>class</span> Draits >
- std::basic_ostream<Elem,Traits>&
- <span class=keyword>operator</span><<( std::basic_ostream<Elem, Traits>& Os,
- <span class=keyword>const</span> <span class=identifier>converter<span><<span class=identifier>D<span>,<span class=identifier>I</span>>& r );
-<span class=special>} </span><span class=comment>// namespace 'assign'</span>
-<span class=special>} </span><span class=comment>// namespace 'boost'</span></pre></blockquote>
+ Let <tt>r1</tt> denote an object modeling <tt>RangeComparable</tt> and <tt>r2</tt> modeling
+ Range.
+
+ <h4>Requirements</h4>
+
+ All comparison operators are defined for each pair involving <tt>r1</tt> and <tt>r2</tt>.
- <h3>Proxy object <code>generic_list<></code><a name=ref-generic_list> </h3>
- <p>
- <b>Header</b> <code><boost/assign/list_of.hpp></code>
- </p>
+ <h3><a name="concept-range_extensible">Concept <tt>RangeExtensible</tt><a></h3>
- <b>Template parameters</b>
- <blockquote>
- <table cellpadding=5 border=1>
- <tr><th class="head">Parameter</th> <th class="head">Description</th>
- <tr><td><tt><span class="pre">T</span></tt></td> <td>Element</td></tr>
- </table>
- </blockquote>
+ An anonymous list may optionally be increased by passing a range to it, rather than an invidivual element.
- <b>Associated types</b>
- <blockquote>
+ <h4>Notation</h4>
+
+ Let <tt>v</tt> denote Range
+ and <tt>e</tt> an object modeling <tt>RangeExtensible</tt>.
+
+ <h4>Requirements</h4>
+
+ <blockquote>
<table cellpadding=5 border=1>
- <tr><th class="head">Expression</th> <th class="head">Description</th>
- <tr><td>converter<>
generic_list<>
</li>
list_inserter<>
</li>
static_generic_list<>
</li>
array_interface<>
</li> -->
expr<>
</li>
lazy_array<>
</li> -->
static_array<>
</li>
chain_impl::expr_l<>
</li>
chain_impl::expr_r<>
</li>
chain_l
and chain_r
.
chain_l
and chaining ranges.
ref_list_of<int>()
.
ref_list_of<int>()
.
Modified: sandbox/statistics/detail/assign/libs/assign/example/range.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/range.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/range.cpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -11,7 +11,6 @@
#include <boost/range/algorithm/copy.hpp>
#include <boost/assign/auto_size/ref_list_of.hpp>
#include <boost/assign/auto_size/range/basic_chain.hpp>
-#include <boost/assign/auto_size/range/chain.hpp>
#include <boost/assign/auto_size/range/chain_l.hpp>
#include <boost/assign/auto_size/range/chain_r.hpp>
#include <boost/assign/auto_size/range/convert_range.hpp>
Modified: sandbox/statistics/detail/assign/libs/assign/src/main.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/src/main.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/src/main.cpp 2010-04-25 21:48:10 EDT (Sun, 25 Apr 2010)
@@ -1,7 +1,7 @@
#include <iostream>
#define BOOST_ASSIGN_CHECK_EQUAL(a,b) BOOST_ASSERT(a==b)
#include <boost/assign/auto_size/check/ref_list_of.hpp>
-//#include <boost/assign/auto_size/check/ref_csv.hpp>
+#include <boost/assign/auto_size/check/ref_csv.hpp>
#undef BOOST_ASSIGN_CHECK_EQUAL
#include <libs/assign/example/range.h>
@@ -74,7 +74,6 @@
(*fp)();
}
std::cout << "check_ref_list_of : ok" << std::endl;
-/*
{ // 1
fp = check_ref_csv_example1<int>;
(*fp)();
@@ -136,7 +135,6 @@
(*fp)();
}
-*/
std::cout << "check_ref_csv : ok" << std::endl;
return 0;
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