Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69638 - sandbox/assign_v2/libs/assign/v2/test/put/container
From: erwann.rogard_at_[hidden]
Date: 2011-03-07 20:14:17


Author: e_r
Date: 2011-03-07 20:14:16 EST (Mon, 07 Mar 2011)
New Revision: 69638
URL: http://svn.boost.org/trac/boost/changeset/69638

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp | 32 ++++++++++++++++----------------
   sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp | 4 +---
   2 files changed, 17 insertions(+), 19 deletions(-)

Modified: sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp 2011-03-07 20:14:16 EST (Mon, 07 Mar 2011)
@@ -35,14 +35,14 @@
         {
             //[array
             const int sz = 3;
- typedef boost::array<int, sz> row_;
- boost::array<row_, sz> matrix3x3;
+ typedef boost::array<int, sz> r_;
+ boost::array<r_, sz> matrix3x3;
             {
- row_ row0, row1, row2;
- as2::put( row0 )( 1 )( 2 )( 3 );
- as2::put( row1 )( 4 )( 5 )( 6 );
- as2::put( row2 )( 7 )( 8 )( 9 );
- as2::put( matrix3x3 )( row0 )( row1 )( row2 );
+ r_ r0, r1, r2;
+ /*<<Calls `r[i] = j` for [^( i, j ) = ( 0, 1 ), ( 1, 2 ), ( 2, 3 )]>>*/as2::put( r0 )( 1 )( 2 )( 3 );
+ as2::put( r1 )( 4 )( 5 )( 6 );
+ as2::put( r2 )( 7 )( 8 )( 9 );
+ /*<<Calls `matrix3x3[i] = r`, for [^( i, r ) = ( 0, r0 ), ( 1, r1 ), ( 2, r2 )]>>*/as2::put( matrix3x3 )( r0 )( r1 )( r2 );
                         }
             for(int i = 0; i < 9; i++)
             {
@@ -52,15 +52,15 @@
         }
                 {
                 //[seq_var_args
- typedef double elem_; typedef std::list<elem_> row_; typedef std::vector<row_> ragged_array_;
- row_ a; as2::put( a )( 0.71 )( 0.63 )( 0.85 );
- row_ b; as2::put( b )( 0.61 )( 0.69 )( 0.92 )( 0.55 );
+ typedef double elem_; typedef std::list<elem_> r_; typedef std::vector<r_> ragged_array_;
+ r_ a; /* Calls `a.push_back( t )` for [^t = 0.71, 0.63, 0.85] */ as2::put( a )( 0.71 )( 0.63 )( 0.85 );
+ r_ b; as2::put( b )( 0.61 )( 0.69 )( 0.92 )( 0.55 );
                         ragged_array_ ragged_array;
             as2::put( ragged_array )
- ( boost::begin( a ), boost::end( a ) )
- ( b )
- ( 1, -99.99 )
- ( );
+ /*<<Calls `ragged_array.push_back( r_( boost::begin( a ), boost::end( a ) ) )`>>*/( boost::begin( a ), boost::end( a ) )
+ /*<<Calls `ragged_array.push_back( r_( b ) )`>>*/( b )
+ /*<<Calls `ragged_array.push_back( r_( 1, -99.99 ) )`>>*/( 1, -99.99 )
+ /*<<Calls `ragged_array.push_back( r_( ) )`>>*/( );
 
                         elem_ eps = boost::numeric::bounds<elem_>::smallest();
             BOOST_ASSIGN_V2_CHECK( ragged_array[0].size() == a.size() );
@@ -77,7 +77,7 @@
                 }
         {
             //[adapter
- std::queue<int> fifo; as2::put( fifo )( 72 )( 31 )( 48 );
+ std::queue<int> fifo; /*<<Calls `fifo.push( t )` for [^t = 72, 31, 48]>>*/as2::put( fifo )( 72 )( 31 )( 48 );
 
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 72 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 48 );
@@ -88,7 +88,7 @@
             //[seq_ref_tuple
             typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY";
             typedef int code_; typedef boost::tuple<state_/*<<Notice the reference>>*/&, code_> area_code_;
- std::deque< area_code_ > tri_state; as2::put( tri_state )( nj, 201 )( ct, 203 )( ny, 212 )( ny, 315 )( ny, 347 )( nj, 551 );
+ std::deque< area_code_ > tri_state; /*Calls `tri_state.push_back( area_code_( s, c ) )` for [^( s, c ) = ( nj, 201 )( ct, 203 )( ny, 212 )( ny, 315 )( ny, 347 )( nj, 551 )]*/as2::put( tri_state )( nj, 201 )( ct, 203 )( ny, 212 )( ny, 315 )( ny, 347 )( nj, 551 );
 
             BOOST_ASSIGN_V2_CHECK( get<0>( tri_state.front() ) == nj );
             BOOST_ASSIGN_V2_CHECK( get<0>( tri_state.back() ) == nj );

Modified: sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp 2011-03-07 20:14:16 EST (Mon, 07 Mar 2011)
@@ -31,9 +31,7 @@
             std::deque< area_code_ > tri_state; as2::put( tri_state )( nj, 201 )( ct, 203 )( ny, 212 )( ny, 315 )( ny, 347 )( nj, 551 );
             std::deque< area_code_ > pacific ; as2::put( pacific )( wa, 206 )( ca, 209 )( ca, 213 )( wa, 253 );
 
- std::deque< area_code_ > states;
- as2::put_range( tri_state, states );
- as2::put_range( pacific, states );
+ std::deque< area_code_ > states; as2::put_range( tri_state, states ); as2::put_range( pacific, states );
 
                         using namespace boost;
             BOOST_ASSIGN_V2_CHECK( get<0>( states.front() ) == nj );


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