Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60539 - in sandbox/statistics/detail/assign: boost/assign/auto_size/array boost/assign/auto_size/chain libs/assign/doc
From: erwann.rogard_at_[hidden]
Date: 2010-03-12 22:02:53


Author: e_r
Date: 2010-03-12 22:02:52 EST (Fri, 12 Mar 2010)
New Revision: 60539
URL: http://svn.boost.org/trac/boost/changeset/60539

Log:
m
Added:
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/as_member.hpp
      - copied unchanged from r60532, /sandbox/statistics/detail/assign/boost/assign/auto_size/array/chainable.hpp
Removed:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/chainable.hpp
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp | 4 +-
   sandbox/statistics/detail/assign/libs/assign/doc/index.html | 75 +++++++++++++++++++++++++++++++--------
   2 files changed, 61 insertions(+), 18 deletions(-)

Deleted: sandbox/statistics/detail/assign/boost/assign/auto_size/array/chainable.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/chainable.hpp 2010-03-12 22:02:52 EST (Fri, 12 Mar 2010)
+++ (empty file)
@@ -1,62 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// assign::detail::array::chainable.hpp //
-// //
-// (C) Copyright 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_CHAINABLE_ER_2010_HPP
-#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_CHAINABLE_ER_2010_HPP
-
-namespace boost{
-namespace assign{
-
-namespace result_of{
-namespace chain_auto_convert{
- template<typename R1,typename R2>
- struct convert_wrapper;
-}// chain_auto_convert
-}// result_of
-
-template<typename R1,typename R2>
-typename result_of::chain_auto_convert::convert_wrapper<R1,R2>::type
-chain_auto_convert_convert_wrapper(R1& r1,R2& r2);
-
-namespace detail{
-namespace auto_size{
-
- // D is a derived type
- template<typename D>
- struct chainable{
-
- template<typename D1,typename R>
- struct result_of_chain_auto_convert
- : assign::result_of::chain_auto_convert::convert_wrapper<D1,R>{};
-
- template<typename R>
- typename result_of_chain_auto_convert<D,R>::type
- chain_auto_convert(R& r){
- return assign::chain_auto_convert_convert_wrapper(
- static_cast<D&>(*this),
- r
- );
- }
-
- template<typename R>
- typename result_of_chain_auto_convert<const D,R>::type
- chain_auto_convert(R& r)const{
- return assign::chain_auto_convert_convert_wrapper(
- static_cast<const D&>(*this),
- r
- );
- }
-
- };
-
-}// auto_size
-}// detail
-}// assign
-}// boost
-
-#endif
\ No newline at end of file

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp 2010-03-12 22:02:52 EST (Fri, 12 Mar 2010)
@@ -15,7 +15,7 @@
 #include <boost/assign/list_of.hpp> // for assign_detail::converter
 #include <boost/assign/auto_size/reference_wrapper/has_copy_semantics.hpp>
 #include <boost/assign/auto_size/array/ref.hpp>
-#include <boost/assign/auto_size/array/chainable.hpp>
+#include <boost/assign/auto_size/chain/as_member.hpp>
 
 namespace boost{
 namespace assign{
@@ -52,7 +52,7 @@
             array_interface<T,N,R,D>,
         typename array_interface_traits<T,N,R>::const_iterator
>
- ,public auto_size::chainable<array_interface<T,N,R,D> >
+ ,public detail::chain_as_member<array_interface<T,N,R,D> >
     {
         typedef array_interface_traits<T,N,R> traits;
         typedef typename traits::ref_ ref_;

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-03-12 22:02:52 EST (Fri, 12 Mar 2010)
@@ -38,7 +38,7 @@
             <li>Function map_list_of()
             <li>Function tuple_list_of()
             <li>Functions repeat(), repeat_fun() and range()
- <li>Functions chain_auto_convert()
+ <li>Function chain_auto_convert()
             <li>Functions ref_list_of(), cref_list_of() and variants
             <li>Functions ref_csv(), cref_csv() and variants
             <li>A "complicated" example
@@ -61,10 +61,11 @@
         <li>Functions ref_list_of(), cref_list_of(), and variants</li>
         <li>Functions ref_csv(), cref_csv(), and variants</li>
         <li>Operator += for standard containers</li>
- <li>Functions repeat(), repeat_fun() and
- <a href="#ref-repeat_ref"><code>range()</code>
+ <li>Functions repeat(), repeat_fun() and
+ <a href="#ref-repeat"><code>range()</code>
                                                                       </a></li>
- <li>Customizing argument list sizes </li>
+ <li>Function chain_auto_convert()</li>
+ <li>Customizing argument list sizes </li>
      </ul>
     <li>
         <a href="#ref-impl">Reference for the implementation</a>
@@ -74,7 +75,7 @@
         <li> Proxy object list_inserter<></li>
         <li> Proxy object static_generic_list<> </li>
         <li> Proxy object array_interface<> </li>
- <li> Proxy object chainable<> </li>
+ <li> Proxy object chain_as_member<> </li>
         <li> Proxy object expr<> </li>
         <li> Proxy object lazy_array<> </li>
         <li> Proxy object static_array<> </li>
@@ -493,7 +494,7 @@
 <span class=special>}</span></pre>
 </blockquote>
 
-As of March 2010 this functionality is experimental, so caution is advised in using it.
+As of March 2010 this functionality is experimental, so caution is advised in using it. See the reference.
 
 <h3>Functions <code>ref_list_of()</code>, <code>cref_list_of()</code> <a name="ref_list_of"> and variants</h3>
 
@@ -829,9 +830,10 @@
         <li>Functions ref_list_of(), cref_list_of(), and variants</li>
         <li>Functions ref_csv(), cref_csv(), and variants</li>
         <li>Operator += for standard containers</li>
- <li>Functions repeat(), repeat_fun() and
- <a href="#ref-repeat_ref"><code>range()</code>
+ <li>Functions repeat(), repeat_fun() and
+ <a href="#ref-repeat"><code>range()</code>
                                                                       </a></li>
+ <li>Function chain_auto_convert()</li>
         <li>Customizing argument list sizes </li>
      </ul>
 
@@ -1114,7 +1116,7 @@
     necessary to allow for types convertible to <code>V</code>.
 
   <h3>Functions <code>repeat()</code>,
- <code>repeat_fun()</code> and <code>range()</code> <a name="ref-repeat_ref"> </h3>
+ <code>repeat_fun()</code> and <code>range()</code> <a name="ref-repeat"> </h3>
   <p>
             These first two function exist both as free-standing functions and as member functions of the object returned by
       <code>list_of()</code> and of <code>list_inserter</code>.
@@ -1139,6 +1141,42 @@
   </blockquote>
   </p>
 
+
+ <h3>Function <code>chain_auto_convert()</code> <a name="ref-chain_auto_convert"> </h3>
+
+ <p> This function joins two ranges into one whose dereferenced type is one that is convertible
+ to from those of the two input ranges. In particular, either range may contain reference wrappers
+ if they meet certain traits requirement. This function serves as a sustitute for range()
+ within the auto-size framework. This function is still experimental as of March 2010. </p>
+
+ <p>
+ <b>Header</b> <code>&lt;boost/assign/auto_size/chain/auto_convert.hpp></code>
+ </p>
+
+ <p> <b>Template parameters</b> </p>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Parameter</th> <th class="head">Description</th>
+ <tr><td><tt>R1</tt></td><td>First argument</td></tr>
+ <tr><td><tt>R2</tt></td><td>Second argument</td></tr>
+ </table>
+ </blockquote>
+
+ <b>Associated types</b>
+
+ <p>To be defined </p>
+
+ <b>Usage</b>
+ <p>Let <code>r1</code> and <code>r2</code> be instances of <code>R1</code> and <code>R2</code> </p>
+
+ <blockquote>
+ <table cellpadding=5 border=1>
+ <tr><th class="head">Expression</th> <th class="head">Result</th>
+ <tr><td><tt>chain_auto_convert(r1,r2)</tt></td><td>A range joining <code>r1</code> and <code>r2</code> </td></tr>
+ </table>
+ </blockquote>
+
   <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.
@@ -1150,7 +1188,7 @@
         <li> Proxy object list_inserter<></li>
         <li> Proxy object static_generic_list<> </li>
         <li> Proxy object array_interface<> </li>
- <li> Proxy object chainable<> </li>
+ <li> Proxy object chain_as_member<> </li>
         <li> Proxy object expr<> </li>
         <li> Proxy object lazy_array<> </li>
         <li> Proxy object static_array<> </li>
@@ -1511,7 +1549,7 @@
           <table cellpadding=5 border=1>
           <tr><th class="head">Expression</th> <th class="head">Description</th>
           <tr><td><tt>R&lt;T&gt;</tt></td><td> Reference wrapper </td> </tr>
- <tr><td>chainable<></td><td> Public base class of array_interface<></td> </tr>
+ <tr><td>chain_as_member<></td><td> Public base class of array_interface<></td> </tr>
           <tr><td>converter<></td><td> Public base class of array_interface<></td> </tr>
           </table>
   </blockquote>
@@ -1528,7 +1566,11 @@
           </table>
   </blockquote>
 
- <h3><a name="ref-chainable">Proxy object <code>chainable&lt;&gt;</code></a></h3>
+ <h3><a name="ref-chain_as_member">Proxy object <code>chain_as_member&lt;&gt;</code></a></h3>
+
+ <p>
+ <b>Header</b> <code>&lt;boost/assign/auto_size/chain/as_member.hpp></code>
+ </p>
 
     <p>
   <b>Template parameters</b>
@@ -1656,15 +1698,16 @@
    This proxy object is the basis of the auto-size framework. A call to the
    unary operator returns an object that keeps a reference to the passed argument, and links to the
    current object, thereby forming a collection whose final size is determined at compile time.
- The function <code>write_to_array()</code> passes the elements of the collection to any array,
+ The function <code>write_to_array()</code> is typically used to pass the elements of the collection to the policy,
    that will be chosen to have the desired interface, usually iterators and conversion operators.
 </p>
 <p>
    The successive arguments that are passed to the unary operator must be allocated on the stack.
- Consequently, this set up is ill-suited for the method <code>range()</code> whose argument size must
+ Consequently, this set up is ill-suited for the method range() whose argument size must
    be specified explicitly (unless its argument has static size), unlike the remainder of this library.
- For a similar interface, it is recommended to choose a policy, such as array_interface, that
- interoperates with the function chain_auto_convert().
+ To overcome this limitation it is recommended to choose a policy,
+ such as array_interface, that
+ interoperates with the function chain_auto_convert().
 </p>
   <h3><a name="ref-lazy_array">Proxy object <code>lazy_array&lt;&gt;</code></a></h3>
   <b>Header</b> <code>&lt;boost/assign/auto_size/array/lazy.hpp></code>


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