Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59688 - in sandbox/statistics/detail/assign/boost/assign/auto_size: . detail
From: erwann.rogard_at_[hidden]
Date: 2010-02-14 22:15:39


Author: e_r
Date: 2010-02-14 22:15:37 EST (Sun, 14 Feb 2010)
New Revision: 59688
URL: http://svn.boost.org/trac/boost/changeset/59688

Log:
m
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp | 4 +++-
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp | 10 ++++++----
   sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp | 2 +-
   3 files changed, 10 insertions(+), 6 deletions(-)

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/assign_refence_copy.hpp 2010-02-14 22:15:37 EST (Sun, 14 Feb 2010)
@@ -17,7 +17,7 @@
     // the rhs to the object pointed to.
     //
     // This is in contrast to assign_reference whose operator= rebinds the
- // address of the internal pointer. To that effect,here, call rebind()
+ // address of the internal pointer. To that effect, here, call rebind()
         template< class T >
     struct assign_reference_copy
     {
@@ -42,6 +42,8 @@
             std::swap( *ref_, *r.ref_ );
         }
 
+ // destructor?
+
         T& get_ref() const
         {
             return *ref_;

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/auto_size.hpp 2010-02-14 22:15:37 EST (Sun, 14 Feb 2010)
@@ -21,10 +21,10 @@
 
 // This is the implementation behind ref_list_of() and ref_copy_list_of().
 //
-// The motivation for this class was to improve upon ref_list_of<int>(), by
-// deducing the number of arguments at compile time, and allowing for either
-// of copy and rebind semantics, in case it is used as the lhs of an assignment;
-// the former (copy) being both safer and more common than the latter (rebind).
+// This approach improves upon ref_list_of<int>() by deducing the number of
+// arguments at compile time and factors the reference wrapper for each element
+// into a template parameter. In general, a reference wrapper that implements
+// copy semantics for operator= is preferable.
 //
 // Acknowledgement: The idea of this class was developed in collaboration
 // with M.P.G
@@ -156,6 +156,8 @@
         }
                 
         typedef boost::shared_ptr<ref_array_> smart_ptr_;
+ // Only one of the N expressions, the last one, needs to instantiate an
+ // array, hence a pointer.
         smart_ptr_ ptr;
                 
     };

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/ref_list_of.hpp 2010-02-14 22:15:37 EST (Sun, 14 Feb 2010)
@@ -20,7 +20,7 @@
 // Note that this function supersedes and has the same side effect as
 // ref_list_of<int>(), which still exists, however, for backward-compatibility.
 //
-// Unlike ref_copy_list_of, it has rebind semantics so that Usage 3 binds d to
+// Unlike ref_copy_list_of, has rebind semantics so that Usage 3 binds d to
 // a, b, c. Unless this very specific need arises, ref_copy_list_of is safer and
 // more straightforward as it takes rvalues.
 


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