Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71936 - in sandbox/assign_v2: boost/assign/v2/ref/array libs/assign/v2 libs/assign/v2/test/option
From: erwann.rogard_at_[hidden]
Date: 2011-05-14 09:21:43


Author: e_r
Date: 2011-05-14 09:21:42 EDT (Sat, 14 May 2011)
New Revision: 71936
URL: http://svn.boost.org/trac/boost/changeset/71936

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp | 3 +--
   sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp | 21 ++++++++++-----------
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 10 ++++------
   3 files changed, 15 insertions(+), 19 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp 2011-05-14 09:21:42 EDT (Sat, 14 May 2011)
@@ -67,8 +67,7 @@
     // Generates an empty array
     template<typename T>
     typename result_of::array<T, nil_>::type
- array( nil_ )
- /*<-*/
+ array( nil_ )/*<-*/
     {
         return ref::list<list_aux::array_tag>( v2::_nil );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/

Modified: sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp 2011-05-14 09:21:42 EDT (Sat, 14 May 2011)
@@ -44,21 +44,20 @@
         }
         {
             //[test_option_iterate_shifted
- typedef int T; boost::array<T, 10> alternating;
- alternating[0] = -1; alternating[1] = +1;
- alternating[2] = -2;
+ typedef int T; boost::array<T, 10> seq;
+ seq[0] = 1; seq[1] = 2; seq[2] = 3;
 
             int index = 3;
             as2::csv_put(
- alternating
+ seq
                 , as2::_option % ( as2::_iterate = boost::lambda::var( index )++ )
- , +2, -3, +3, -4, +4, -5, +5
+ , 4, 5, 6, 7, 8, 9, 10
             );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
- alternating,
- as2::csv_deque( -1, +1, -2, +2, -3, +3, -4, +4, -5, +5 )
+ seq,
+ as2::csv_deque( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )
                 )
             );
             //]
@@ -78,20 +77,20 @@
         {
             //[test_option_iterate_shifted_deque
             as2::result_of::csv_deque<int>::type tmp = as2::csv_deque<int>
- ( -1, +1, -2, as2::as_arg_list( std::list<int>( 7 ) ) );
+ ( 1, 2, 3, as2::as_arg_list( std::list<int>( 7 ) ) );
 
             int index = 3;
             BOOST_AUTO(
- alternating ,
+ seq,
                 (
                     tmp % ( as2::_iterate = boost::lambda::var( index )++ )
- )( +2 )( -3 )( +3 )( -4 )( +4 )( -5 )( +5 )
+ )( 4 )( 5 )( 6 )( 7 )( 8 )( 9 )( 10 )
             );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
                     alternating,
- as2::csv_deque( -1, +1, -2, +2, -3, +3, -4, +4, -5, +5 )
+ as2::csv_deque( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )
                 )
             );
             //]

Modified: sandbox/assign_v2/libs/assign/v2/tutorial.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/tutorial.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/tutorial.cpp 2011-05-14 09:21:42 EDT (Sat, 14 May 2011)
@@ -42,7 +42,7 @@
             typedef std::string str_; typedef variant< int, str_ > data_;
             array<data_, 16> keypad;
             
- /*<<Equivalent to `put( keypad )( "+" )( "-" )...( "." )( 0 )...( 9 )`>>*/csv_put( keypad, "+", "-", "*", "/", "=", ".", as_arg_list( numeric ) );
+ /*<<Equivalent to `put( keypad )( "+" )( "-" )...( "." ).as_arg_list( numeric )`>>*/csv_put( keypad, "+", "-", "*", "/", "=", ".", as_arg_list( numeric ) );
 
             assert( get<str_>( keypad.front() ) == "+" );
             assert( get<int>( keypad.back() ) == 9 );
@@ -102,10 +102,8 @@
             );
 
             assert( range::equal( head, csv_deque( 1, 2, 3, 4 ) ) );
- assert( t == 5 );
- assert( a == 6 );
- assert( i == 7 );
- assert( l == 8 );
+ assert( t == 5 ); assert( a == 6 );
+ assert( i == 7 ); assert( l == 8 );
             //]
         }
         {
@@ -144,7 +142,7 @@
             typedef function<double(double)> f_;
             /*<<Equivalent to `( put( exponent ) % ( _data = f_( log10 ) ) )( 1.0 ) ...( 10000.0 )`>>*/csv_put(
                 exponent
- , _option % ( _data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ ) )
+ , _option % ( _data = f_( /*<-*/fp(/*->*/log10/*<-*/)/*->*/ ) )
                 , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
 


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