Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69119 - in sandbox/assign_v2: boost/assign/v2/put/std libs/assign/v2/test
From: erwann.rogard_at_[hidden]
Date: 2011-02-21 06:37:00


Author: e_r
Date: 2011-02-21 06:36:57 EST (Mon, 21 Feb 2011)
New Revision: 69119
URL: http://svn.boost.org/trac/boost/changeset/69119

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/put/std/xxx.hpp | 10 +++++-----
   sandbox/assign_v2/libs/assign/v2/test/other.cpp | 10 ++++++----
   2 files changed, 11 insertions(+), 9 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/put/std/xxx.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/std/xxx.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/std/xxx.hpp 2011-02-21 06:36:57 EST (Mon, 21 Feb 2011)
@@ -32,15 +32,15 @@
         modifier(){}\
         modifier( dont_care_ ){}\
 \
- template<typename V, typename T>\
- void impl(V& v, BOOST_ASSIGN_V2_forward_param(T, t) )const{\
- v.FUN(\
+ template<typename C, typename T>\
+ void impl(C& cont, BOOST_ASSIGN_V2_forward_param(T, t) )const{\
+ cont.FUN(\
                 BOOST_ASSIGN_V2_forward_arg(T, t)\
             );\
         }\
 \
- template<typename V, typename T>\
- void impl(V& v, T* t)const{ v.FUN( t ); }\
+ template<typename C, typename T>\
+ void impl(C& cont, T* t)const{ cont.FUN( t ); }\
 \
     };\
 \

Modified: sandbox/assign_v2/libs/assign/v2/test/other.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/other.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/other.cpp 2011-02-21 06:36:57 EST (Mon, 21 Feb 2011)
@@ -83,15 +83,17 @@
         }
         {
                 // suggested by JB:
- typedef int T; std::vector<T> cont;
- boost::range::stable_partition(
- cont | as2::_csv_put(0, 1, 2, 3, 4, 5),
+ //[motivational_ex1
+ std::vector<int> cont;
+ boost::range::stable_partition(
+ cont | as2::_csv_put(0, 1, 2, 3, 4, 5)/*< Successively calls cont.push_back( t ) for t=0,...,5, and returns cont >*/,
                 bl::_1 % 2
             );
                            BOOST_ASSIGN_V2_CHECK(boost::range::equal(
                                cont,
- as2::ref::csv_array(1, 3, 5, 0, 2, 4)
+ as2::ref::csv_array(1, 3, 5, 0, 2, 4) /*< Copying is avoided by keeping references to the input (1, 3, ..., 4) >*/
             ));
+ //]
         
         }
     }


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