Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66519 - sandbox/statistics/support/libs/assign/v2/example
From: erwann.rogard_at_[hidden]
Date: 2010-11-12 08:05:43


Author: e_r
Date: 2010-11-12 08:05:38 EST (Fri, 12 Nov 2010)
New Revision: 66519
URL: http://svn.boost.org/trac/boost/changeset/66519

Log:
update to libs/assign/v2
Text files modified:
   sandbox/statistics/support/libs/assign/v2/example/tutorial.cpp | 43 ++++++++++++++++++++-------------------
   1 files changed, 22 insertions(+), 21 deletions(-)

Modified: sandbox/statistics/support/libs/assign/v2/example/tutorial.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/tutorial.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/tutorial.cpp 2010-11-12 08:05:38 EST (Fri, 12 Nov 2010)
@@ -1,12 +1,12 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////
+// Boost.Assign v2 //
+// //
+// Copyright (C) 2003-2004 Thorsten Ottosen //
+// Copyright (C) 2010 Erwann Rogard //
+// Use, modification and distribution are subject to the //
+// Boost Software License, Version 1.0. (See accompanying file //
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
+////////////////////////////////////////////////////////////////////////////
 #include <deque>
 #include <map>
 #include <vector>
@@ -36,23 +36,23 @@
                     ( put( cont ) % ( _fun = boost::lambda::bind<tuple_>(
                             constructor<tuple_>(),
                             boost::lambda::_1,
- a2
+ a2
                             ) ) )( a1 )( b1 )( c1 );
                 }
                 {
                     typedef std::map<const char*, int> cont_;
                 typedef boost::range_value<cont_>::type value_;
                 cont_ cont;
- ( put( cont ) % _incr_lookup).csv( "x", "y", "x" );
- BOOST_ASSERT( cont["x"] == 2 );
- BOOST_ASSERT( cont["y"] == 1 );
+ ( put( cont ) % ( _incr_lookup = 2 ) )( "x" )( "y" )( "x" );
+ BOOST_ASSERT( cont["x"] == 4 );
+ BOOST_ASSERT( cont["y"] == 2 );
                 }
         }
         {
                 // --- ANON --- //
                 {
                     typedef std::vector<int> cont_;
- cont_ cont = anon( 1 )( 2 )( 3 ).convert<cont_>();
+ cont_ cont = csv_anon( 1 )( 2 )( 3 ).convert<cont_>();
                 BOOST_ASSERT( cont[0] == 1 );
                 BOOST_ASSERT( cont[2] == 3 );
                 }
@@ -61,19 +61,19 @@
                 // --- REF-ANON-- //
                         using namespace ref;
             { // -- assign_copy-- //
- std::vector<int> v( 3 );
- v[ 0 ] = 1;
- v[ 1 ] = 2;
+ std::vector<int> v( 3 );
+ v[ 0 ] = 1;
+ v[ 1 ] = 2;
                 v[ 2 ] = 3;
                     int a, b, c;
- boost::copy( v ,
+ boost::copy( v ,
                         boost::begin( assign_copy::anon( a )( b )( c ) ) );
                                 BOOST_ASSERT( a == v[ 0 ] );
                                 BOOST_ASSERT( b == v[ 1 ] );
                                 BOOST_ASSERT( c == v[ 2 ] );
             }
                         {
- int a = 1, b = 2, c = 3;
+ int a = 1, b = 2, c = 3;
                                 BOOST_AUTO( tmp, assign_rebind::csv_anon( a , b ) );
                                 tmp.assign( c );
                                 BOOST_ASSERT( &tmp[ 0 ] == &c );
@@ -84,9 +84,10 @@
                 using namespace ref;
                 typedef boost::array<int,3> cont_;
             cont_ cont; cont[ 0 ] = 1; cont[ 1 ] = 2; cont[ 2 ] = 3;
- int a, b, c = 3;
+ int a, b, c = 3;
                         BOOST_AUTO( tmp, assign_copy::anon( a )( b ) );
- boost::copy( cont , boost::begin( tmp && assign_copy::anon( c ) ) );
+ boost::copy(
+ cont , boost::begin( tmp && assign_copy::anon( c ) ) );
                         BOOST_ASSERT( a == cont[ 0 ] );
                         BOOST_ASSERT( b == cont[ 1 ] );
                         BOOST_ASSERT( c == cont[ 2 ] );


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