Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70169 - in sandbox/assign_v2/boost/assign/v2: ref/aux_/list/holder utility/chain
From: erwann.rogard_at_[hidden]
Date: 2011-03-18 20:20:39


Author: e_r
Date: 2011-03-18 20:20:38 EDT (Fri, 18 Mar 2011)
New Revision: 70169
URL: http://svn.boost.org/trac/boost/changeset/70169

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/head.hpp | 6 +++---
   sandbox/assign_v2/boost/assign/v2/utility/chain/chain.hpp | 10 +++++++---
   2 files changed, 10 insertions(+), 6 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/head.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/head.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/head.hpp 2011-03-18 20:20:38 EDT (Fri, 18 Mar 2011)
@@ -25,13 +25,13 @@
 
         typedef T head_value_type;
 
- explicit head_holder(T& t) : head_( t ){}
+ explicit head_holder(T& t) : head_( &t ){}
 
         typedef T& result_of_head_type;
- result_of_head_type head()const{ return this->head_; }
+ result_of_head_type head()const{ return (*this->head_); }
 
         private:
- mutable T& head_;
+ T* head_;
 
     };
 

Modified: sandbox/assign_v2/boost/assign/v2/utility/chain/chain.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/chain/chain.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/chain/chain.hpp 2011-03-18 20:20:38 EDT (Fri, 18 Mar 2011)
@@ -29,8 +29,12 @@
     template<typename U>
     struct adaptor1
     {
- adaptor1( U& r ) : value( r ){}
- mutable U& value;
+ adaptor1( U& r )
+ : ptr( &r )
+ {}
+ U& reference()const{ return *this->ptr; }
+ private:
+ mutable U* ptr;
     };
 
     struct adaptor2
@@ -76,7 +80,7 @@
     operator|(U1 & r1, chain_aux::adaptor1<U2> const & h) \
     { \
         typedef chain_aux::result<U1, U2> caller_; \
- return caller_::call( r1, h.value ); \
+ return caller_::call( r1, h.reference() ); \
     } \
 \
 /**/


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