Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71469 - in sandbox/assign_v2: boost/assign/v2/conversion boost/assign/v2/interpreter boost/assign/v2/ref/aux_/list boost/assign/v2/ref/aux_/list/holder libs/assign/v2 libs/assign/v2/test libs/assign/v2/test/detail libs/assign/v2/test/option libs/assign/v2/test/put libs/assign/v2/test/ref libs/assign/v2/test/ref/aux_
From: erwann.rogard_at_[hidden]
Date: 2011-04-24 20:54:34


Author: e_r
Date: 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
New Revision: 71469
URL: http://svn.boost.org/trac/boost/changeset/71469

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp | 7 +++--
   sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp | 2 +
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp | 16 ++++---------
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/tail.hpp | 18 +++++---------
   sandbox/assign_v2/libs/assign/v2/test/chain.cpp | 30 ++++++++++++------------
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp | 19 +++++++--------
   sandbox/assign_v2/libs/assign/v2/test/deque.cpp | 26 ++++++++++-----------
   sandbox/assign_v2/libs/assign/v2/test/detail/functor.cpp | 31 ++++++++++++-------------
   sandbox/assign_v2/libs/assign/v2/test/option/data.cpp | 14 ++++-------
   sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp | 18 +++++++-------
   sandbox/assign_v2/libs/assign/v2/test/option/list.cpp | 7 ++---
   sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp | 17 ++++++-------
   sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp | 7 ++---
   sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp | 12 ++++-----
   sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp | 11 ++++-----
   sandbox/assign_v2/libs/assign/v2/test/put/put.cpp | 48 +++++++++++++++++++--------------------
   sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp | 9 +++----
   sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.cpp | 3 -
   sandbox/assign_v2/libs/assign/v2/test/ref/csv_array.cpp | 9 +++----
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 13 ++++++----
   20 files changed, 147 insertions(+), 170 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -27,12 +27,13 @@
     template<typename R, typename Arg = nil_>
     class converter
     {
-
- /*<-*/typedef boost::iterator_range<
+//<-
+ typedef boost::iterator_range<
             typename boost::range_iterator<
                 typename boost::add_const<R>::type
>::type
- > source_type;/*->*/
+ > source_type;
+//->
 
         public:
 

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -24,11 +24,13 @@
     struct data_generator{};
 }// switch_tag
 
+/*<-*/
 #define BOOST_ASSIGN_V2_SWITCH_TAG data_generator
 BOOST_ASSIGN_V2_SWITCH_CASE(0, container_aux::is_multi_array, element_)
 BOOST_ASSIGN_V2_SWITCH_CASE(1, container_aux::is_map, map_)
 BOOST_ASSIGN_V2_SWITCH_CASE_DEFAULT(2, value_)
 #undef BOOST_ASSIGN_V2_SWITCH_TAG
+/*->*/
 
 namespace interpreter_aux{
 

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -49,9 +49,9 @@
             typedef container<Tag, H1, this_> type;
         };
 
- explicit container(typename ptr_wrapper<T>::type t, H h)
+ explicit container(typename call_traits<T>::param_type t, H h)
             : tail_holder_( t ),
- head_holder_( h )
+ head_holder_( h )
         {}
 
         template<typename H1>
@@ -68,18 +68,12 @@
         
         protected:
 
- typename ptr_wrapper<container>::type clone()const
- {
- return typename ptr_wrapper<container>::type(
- new container( *this )
- );
- }
-
         template<typename H1>
         typename result<H1&>::type
- impl(H1 & h)const{
+ impl(H1 & h)const
+ {
             typedef typename result<H1&>::type result_;
- return result_( this->clone(), h );
+ return result_( *this, h );
         }
 
     };

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/tail.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/tail.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/tail.hpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -13,7 +13,7 @@
 #include <boost/assign/v2/ref/aux_/list/fwd.hpp>
 #include <boost/config.hpp>
 #include <boost/mpl/int.hpp>
-#include <boost/shared_ptr.hpp>
+#include <boost/call_traits.hpp>
 
 namespace boost{
 namespace assign{
@@ -22,12 +22,6 @@
 namespace list_aux{
 
     template<typename T>
- struct ptr_wrapper
- {
- typedef boost::shared_ptr<T const> type;
- };
-
- template<typename T>
     struct tail_holder
     {
         typedef T tail_type;
@@ -35,13 +29,15 @@
             T::static_size::value + 1
> static_size;
         typedef T const& result_of_tail_type;
- typedef typename ptr_wrapper<T>::type ptr_wrapper_;
 
- tail_holder(ptr_wrapper_ w) : tail_( w ){}
- result_of_tail_type tail()const{ return *this->tail_; }
+ tail_holder(typename boost::call_traits<T>::param_type t)
+ : tail_( t )
+ {}
+
+ result_of_tail_type tail()const{ return this->tail_; }
 
         private:
- typename ptr_wrapper<T>::type const tail_;
+ typename boost::call_traits<T>::value_type tail_;
     };
 
     template<>

Modified: sandbox/assign_v2/libs/assign/v2/test/chain.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/chain.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/chain.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -31,8 +31,7 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             namespace ns = as2::check_chain_aux;
             { typedef int T; ns::static_<T>(); ns::static_<T>(); }
@@ -50,47 +49,48 @@
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( word, as2::csv_deque<T>("O", "R", "B", "I", "T") )
+ boost::range::equal( word, as2::csv_deque<T>("O", "R", "B", "I", "T") )
             );
             //]
         }
         {
             //[test_chain_write
- typedef int T; array<T, 3> head; std::list<T> tail( 2 );
+ typedef int T; boost::array<T, 3> head; std::list<T> tail( 2 );
             
- copy(
+ boost::copy(
                 as2::csv_deque( 1, 2, 3, 4, 5 ),
                 boost::begin( head | as2::_chain( tail ) )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( head, as2::csv_deque( 1, 2, 3 ) )
+ boost::range::equal( head, as2::csv_deque( 1, 2, 3 ) )
             );
             BOOST_ASSIGN_V2_CHECK(
- range::equal( tail, as2::csv_deque( 4, 5 ) )
+ boost::range::equal( tail, as2::csv_deque( 4, 5 ) )
             );
             //]
         }
         // Boost.Assign.v2 containers
         {
             //[test_chain_write_refs
- std::vector<int> source( 8 ); iota(source, 1);
- array<int, 5> copies; int x, y, z;
+ std::vector<int> source( 8 ); boost::iota(source, 1);
+ boost::array<int, 4> head; int t, a, i, l;
             
- /*<<Brings `&&` to scope>>*/using namespace assign::v2;
+ /*<<Brings `&&` to scope>>*/using namespace boost::assign::v2;
             boost::copy(
                 source,
                 boost::begin(
- copies && (/*<< rvalue! >>*/ as2::ref::csv_array( x, y, z ) | as2::ref::_get )
+ head && (/*<< rvalue! >>*/ as2::ref::csv_array( t, a, i, l ) | as2::ref::_get )
                 )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( copies, as2::csv_deque( 1, 2, 3, 4, 5 ) )
+ boost::range::equal( head, as2::csv_deque( 1, 2, 3, 4 ) )
             );
- BOOST_ASSIGN_V2_CHECK( x == 6 );
- BOOST_ASSIGN_V2_CHECK( y == 7 );
- BOOST_ASSIGN_V2_CHECK( z == 8 );
+ BOOST_ASSIGN_V2_CHECK( t == 5 );
+ BOOST_ASSIGN_V2_CHECK( a == 6 );
+ BOOST_ASSIGN_V2_CHECK( i == 7 );
+ BOOST_ASSIGN_V2_CHECK( l == 8 );
             //]
         }
 

Modified: sandbox/assign_v2/libs/assign/v2/test/conversion.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/conversion.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/conversion.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -37,8 +37,7 @@
     
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         namespace ns = as2::check_aux;
 
         // External containers (fully qualified)
@@ -56,7 +55,7 @@
         }
         {
             //[test_converter
- std::list<int> source( 3 ); iota( source, 1 );
+ std::list<int> source( 3 ); boost::iota( source, 1 );
             
             std::queue<int> fifo = as2::converter( source );
             
@@ -67,7 +66,7 @@
         {
             //[test_converter_f
             typedef int T; typedef std::vector<T> R;
- R benchmark( 10 ); iota( benchmark, 0 );
+ R benchmark( 10 ); boost::iota( benchmark, 0 );
             
             as2::result_of::converter<R>::type source( benchmark );
             
@@ -99,10 +98,10 @@
         }
         {
             //[test_conversion_matrix3x3
- const int sz = 3; typedef array<int, sz> row_;
+ const int sz = 3; typedef boost::array<int, sz> row_;
             
             as2::convert<row_> as_row;
- array<row_, sz> matrix3x3 = converter(
+ boost::array<row_, sz> matrix3x3 = converter(
                 as2::ref::array
                     ( as2::ref::csv_array( 1, 2, 3 ) | as_row )
                     ( as2::ref::csv_array( 4, 5, 6 ) | as_row )
@@ -123,7 +122,7 @@
             typedef size_ const dim_;
             dim_ dim1 = 3, dim2 = 3;
             array2_ array2 = converter(
- extents[dim1][dim2],
+ boost::extents[dim1][dim2],
                 as2::csv_deque(-1, +1, -1, +1, -1, +1, -1, +1, -1)
             );
             
@@ -134,9 +133,9 @@
             };
             size_ const n = array2.num_elements();
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
- make_iterator_range( array2.data(), n + array2.data() ),
- make_iterator_range( benchmark, n + benchmark )
+ boost::range::equal(
+ boost::make_iterator_range( array2.data(), n + array2.data() ),
+ boost::make_iterator_range( benchmark, n + benchmark )
                 )
             );
             //]

Modified: sandbox/assign_v2/libs/assign/v2/test/deque.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/deque.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/deque.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -25,9 +25,7 @@
 
     void test()
     {
-
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             //[test_deque_str_literal
             typedef as2::result_of::deque<char*>::type C;
@@ -39,7 +37,7 @@
             benchmark.push_back( "y" );
             benchmark.push_back( "z" );
             
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, deque ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque ) );
             //]
         }
         {
@@ -62,11 +60,11 @@
 
             cont1( x, 3 )( y )( z, 3, 3 )( "qux" );
             
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, cont1 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, cont1 ) );
             
             C cont2 = as2::deque<word_>( x, 3 )( y )( z, 3, 3 )( "qux" );
             
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, cont2 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, cont2 ) );
             //]
         }
         {
@@ -85,8 +83,8 @@
             benchmark.push_back( "y" );
             benchmark.push_back( "z" );
             
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, deque1 ) );
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, deque2 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque1 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque2 ) );
             //]
         }
         {
@@ -103,14 +101,14 @@
             benchmark.push_back( "y" );
             benchmark.push_back( "z" );
             
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, deque ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque ) );
             //]
         }
         {
             //[test_csv_deque_ints
             typedef as2::result_of::csv_deque<int>::type C;
             
- BOOST_MPL_ASSERT(( is_same<C, as2::result_of::deque<int>::type> ));
+ BOOST_MPL_ASSERT(( boost::is_same<C, as2::result_of::deque<int>::type> ));
 
             C series1 = as2::csv_deque( 0, 1, 1, 2, 3, 5, 8 );
     
@@ -123,21 +121,21 @@
             benchmark.push_back( 5 );
             benchmark.push_back( 8 );
 
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, series1 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, series1 ) );
 
             C series2 = as2::csv_deque( 0, 1, 1 )( 2 )( 3 )( 5 )( 8 );
 
- BOOST_ASSIGN_V2_CHECK( range::equal( benchmark, series2 ) );
+ BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, series2 ) );
             //]
         }
         {
             //[test_csv_deque_converter
- typedef array<int, 5> C; C const& ar = /*<<Notice unqualified>>*/converter(
+ typedef boost::array<int, 5> C; C const& ar = /*<<Notice unqualified>>*/converter(
                 as2::csv_deque( 1, 2, 3, 4, 5 )
             );
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal( ar, as2::csv_deque( 1, 2, 3, 4, 5 ) )
+ boost::range::equal( ar, as2::csv_deque( 1, 2, 3, 4, 5 ) )
             );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/detail/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/detail/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/detail/functor.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -19,8 +19,7 @@
 
 
     void test(){
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
 #if !BOOST_ASSIGN_V2_ENABLE_CPP0X
 // Requirement specific to this test file
 #if BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY != 2
@@ -38,8 +37,8 @@
             typedef boost::tuple<e_&, e_&> tuple_;
             typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, y ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( x, y ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, y ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( x, y ) ) == &y );
 
         }
         {
@@ -48,15 +47,15 @@
                 typedef boost::tuple<e_&, e_ const&> tuple_;
                 typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, 1 ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( get<1>( value_()( x, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, 1 ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( boost::get<1>( value_()( x, 1 ) ) == 1 );
             }
             {
                 typedef boost::tuple< e_ const&, e_&> tuple_;
                 typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( get<0>( value_()( 1, x ) ) == 1 );
- BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( 1, x ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( 1, x ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( 1, x ) ) == &x );
             }
         }
         {
@@ -64,8 +63,8 @@
             typedef boost::tuple<e_&, e_&, e_&> tuple_;
             typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, y, z ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( x, y, z ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, y, z ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( x, y, z ) ) == &y );
         }
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
         {
@@ -73,9 +72,9 @@
             typedef boost::tuple<e_ const&, e_ &, e_ const&> tuple_;
             typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( get<0>( value_()( -1, y, 1 ) ) == -1 );
- BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( -1, y, 1 ) ) == &y );
- BOOST_ASSIGN_V2_CHECK( get<2>( value_()( -1, y, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( -1, y, 1 ) ) == -1 );
+ BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( -1, y, 1 ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( boost::get<2>( value_()( -1, y, 1 ) ) == 1 );
         }
 #endif
         {
@@ -83,9 +82,9 @@
             typedef boost::tuple<e_ const&, e_ const&, e_ const&> tuple_;
             typedef as2::functor_aux::value<tuple_> value_;
 
- BOOST_ASSIGN_V2_CHECK( get<0>( value_()( -1, 0, 1 ) ) == -1 );
- BOOST_ASSIGN_V2_CHECK( get<1>( value_()( -1, 0, 1 ) ) == 0 );
- BOOST_ASSIGN_V2_CHECK( get<2>( value_()( -1, 0, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( -1, 0, 1 ) ) == -1 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<1>( value_()( -1, 0, 1 ) ) == 0 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<2>( value_()( -1, 0, 1 ) ) == 1 );
         }
     }
 

Modified: sandbox/assign_v2/libs/assign/v2/test/option/data.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/data.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/data.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -26,30 +26,26 @@
 #include <boost/typeof/typeof.hpp>
 #include <libs/assign/v2/test/option/data.h>
 
-// TODO
-#include <iostream>
-
 namespace test_assign_v2{
 namespace xxx_option{
 namespace xxx_data{
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             // (*fp) resolves error C2440 using MSVC
             //[test_option_data_math
             std::vector<double> exponent;
             /*<-*/typedef double(*fp)(double);/*->*/
- typedef function<double(double)> f_;
+ typedef boost::function<double(double)> f_;
             as2::csv_put(
                 exponent
                 , as2::_data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ )
                 , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
 
- double eps = numeric::bounds<double>::smallest();
+ double eps = boost::numeric::bounds<double>::smallest();
             BOOST_ASSIGN_V2_CHECK( fabs( exponent.front() - 0.0 ) < eps );
             BOOST_ASSIGN_V2_CHECK( fabs( exponent.back() - 4.0 ) < eps );
             //]
@@ -59,9 +55,9 @@
             int k = 1;
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     as2::csv_deque(
- as2::_data = ( lambda::var( k ) *= lambda::_1 ),
+ as2::_data = ( boost::lambda::var( k ) *= boost::lambda::_1 ),
                         1, 2, 3, 4, 5
                     ),
                     as2::csv_deque( 1, 2, 6, 24, 120 )

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-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -29,34 +29,34 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2; {
+ namespace as2 = boost::assign::v2;
+ {
             //[test_option_iterate_meta
             typedef as2::functor_aux::iterate arg_;
- typedef array<int, 4> cont_;
+ typedef boost::array<int, 4> cont_;
             typedef as2::result_of::put<cont_>::type put_;
             typedef as2::result_of::option_iterate<put_, arg_>::type result1_;
             typedef as2::modifier_tag::iterate<arg_> tag1_;
- typedef as2:: interpreter_aux::replace_modifier_tag<put_> meta2_;
+ typedef as2::interpreter_aux::replace_modifier_tag<put_> meta2_;
             typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
             BOOST_MPL_ASSERT(( is_same<result1_, result2_> ));
             //]
         }
         {
             //[test_option_iterate_shifted
- typedef int T; array<T, 10> alternating;
+ typedef int T; boost::array<T, 10> alternating;
             alternating[0] = -1; alternating[1] = +1;
             alternating[2] = -2;
 
             int index = 3;
             as2::csv_put(
                 alternating
- , as2::_iterate = lambda::var( index )++
+ , as2::_iterate = boost::lambda::var( index )++
                 , +2, -3, +3, -4, +4, -5, +5
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     alternating,
                     as2::csv_deque( -1, +1, -2, +2, -3, +3, -4, +4, -5, +5 )
                 )
@@ -84,12 +84,12 @@
             BOOST_AUTO(
                 alternating ,
                 (
- tmp % ( as2::_iterate = lambda::var( index )++ )
+ tmp % ( as2::_iterate = boost::lambda::var( index )++ )
                 )( +2 )( -3 )( +3 )( -4 )( +4 )( -5 )( +5 )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     alternating,
                     as2::csv_deque( -1, +1, -2, +2, -3, +3, -4, +4, -5, +5 )
                 )

Modified: sandbox/assign_v2/libs/assign/v2/test/option/list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/list.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/list.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -25,8 +25,7 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         
         {
             //[test_option_list
@@ -38,12 +37,12 @@
 
             BOOST_AUTO(
                 options,
- as2::_push_front % ( as2::_data = ( lambda::_1 % 10 ) )
+ as2::_push_front % ( as2::_data = ( boost::lambda::_1 % 10 ) )
             );
             ( as2::put( cont ) % options )( 13 )( 12 )( 11 );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( cont, as2::csv_deque( 1, 2, 3, 4, 5 ) )
+ boost::range::equal( cont, as2::csv_deque( 1, 2, 3, 4, 5 ) )
             );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -19,6 +19,7 @@
 #include <boost/lambda/lambda.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/apply.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/typeof/typeof.hpp>
 #include <boost/tuple/tuple.hpp>
@@ -30,9 +31,7 @@
 
     void test()
     {
-
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             //[test_option_mapped_map
             typedef std::string month_; typedef int days_;
@@ -40,7 +39,7 @@
             (
                 as2::put( year )
                     ( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )
- % ( as2::_data = as2::_key ) % ( as2::_mapped = ( lambda::_1 = 31 ) )
+ % ( as2::_data = as2::_key ) % ( as2::_mapped = ( boost::lambda::_1 = 31 ) )
             )/*<<Calls `year[ month_( "jan" ) ] = 31`>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
             
             BOOST_ASSIGN_V2_CHECK( year["jan"] == 31 );
@@ -49,7 +48,7 @@
         }
         {
             //[test_option_mapped_meta_deque
- typedef BOOST_TYPEOF(lambda::_1) arg_;
+ typedef BOOST_TYPEOF(boost::lambda::_1) arg_;
             typedef as2:: interpreter_aux::keyword_mapped keyword_;
             typedef as2::result_of::deque<int>::type put_;
             typedef as2::result_of::option_mapped<put_, arg_>::type result1_;
@@ -61,16 +60,16 @@
         }
         {
             //[test_option_mapped_deque
- std::list<int> source(10, 1);
- BOOST_AUTO( option, ( as2::_mapped = ( lambda::_1 *= -1 ) ) );
+ std::list<int> source(10, 1); boost::iota( source, 1 );
+ BOOST_AUTO( option, ( as2::_mapped = ( boost::lambda::_1 *= -1 ) ) );
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     (
                         as2::deque<int>( as2::as_arg_list( source ) )
                         % option
                     )( 1 )( 3 )( 5 )( 7 )( 9 ),
- as2::csv_deque( +1, -1, +1, -1, +1, -1, +1, -1, +1, -1 )
+ as2::csv_deque( +1, -2, +3, -4, +5, -6, +7, -8, +9, -10 )
                 )
             );
             //]

Modified: sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -23,15 +23,14 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             //[test_option_repeat_simple
             std::vector<int> cont;
             as2::csv_put( cont, as2::_repeat = 2, 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     cont,
                     as2::csv_deque( 1, 1, 10, 10, 100, 100 )
                 )
@@ -47,7 +46,7 @@
             );
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal( cont, as2::csv_deque( 100, 100, 10, 10, 1, 1 ) )
+ boost::range::equal( cont, as2::csv_deque( 100, 100, 10, 10, 1, 1 ) )
             );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -27,8 +27,6 @@
 
     void test()
     {
-
- using namespace boost;
         namespace as2 = boost::assign::v2;
         
         //[test_option_row_major
@@ -36,10 +34,10 @@
         typedef array2_::size_type size_;
         typedef size_ const dim_;
         dim_ dim1 = 3, dim2 = 3;
- array2_ array2( extents[dim1][dim2] );
+ array2_ array2( boost::extents[dim1][dim2] );
 
         int k = -2;
- BOOST_AUTO( option, as2::_row_major = ( lambda::var( k ) += 2 ) );
+ BOOST_AUTO( option, as2::_row_major = ( boost::lambda::var( k ) += 2 ) );
         as2::csv_put( array2, option, -1, -1, -1, -1, -1 );
         k = -1; as2::csv_put( array2, option, +1, +1, +1, +1 );
         
@@ -50,9 +48,9 @@
         };
         size_ const n = array2.num_elements();
         BOOST_ASSIGN_V2_CHECK(
- range::equal(
- make_iterator_range( array2.data(), n + array2.data() ),
- make_iterator_range( benchmark, n + benchmark )
+ boost::range::equal(
+ boost::make_iterator_range( array2.data(), n + array2.data() ),
+ boost::make_iterator_range( benchmark, n + benchmark )
             )
         );
         //]

Modified: sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -33,8 +33,7 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
 
         // PUT
         {
@@ -55,14 +54,14 @@
             boost::circular_buffer<int> cb( 3 );
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     cb | as2::delay_csv_put( as2::_push_front, as2::csv_deque( 3, 2, 1 ) ),
                     as2::csv_deque( 1, 2, 3 )
                 )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
                     as2::csv_deque( 3, 4, 5 )
                 )
@@ -96,7 +95,7 @@
             as2::csv_put( list, as2::_push_back, 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( list, as2::csv_deque( 1, 10, 100 ) )
+ boost::range::equal( list, as2::csv_deque( 1, 10, 100 ) )
             );
             //]
         }
@@ -120,7 +119,7 @@
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( two_power_n, as2::csv_deque( 1, 2, 4, 8, 16 ) )
+ boost::range::equal( two_power_n, as2::csv_deque( 1, 2, 4, 8, 16 ) )
             );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/put/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/put.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -47,14 +47,13 @@
 
     void test(){
 
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
 
         // STL
         {
             //[test_csv_put_stl
             std::queue<int> adapter; as2::csv_put( adapter, 1, 10, 100 );
- array<int, 3> array; as2::csv_put( array, 1, 10, 100 );
+ boost::array<int, 3> array; as2::csv_put( array, 1, 10, 100 );
             std::set<int> assoc; as2::csv_put( assoc, 1, 10, 100 );
             std::list<int> seq; as2::csv_put( seq, 1, 10, 100 );
             //]
@@ -70,25 +69,26 @@
         // ARRAY
         {
              //[test_csv_put_keypad
- std::vector<int> numeric( 10 ); iota( numeric, 0 ); typedef std::string str_;
- typedef variant< int, str_ > key_; array<key_, 16> keypad;
+ std::vector<int> numeric( 10 ); boost::iota( numeric, 0 );
+ typedef std::string str_; typedef boost::variant< int, str_ > key_;
+ boost::array<key_, 16> keypad;
             as2::csv_put( keypad
                 , "+", "-", "*", "/", "=", "."
                 , as2::as_arg_list( numeric )
             );
 
- BOOST_ASSIGN_V2_CHECK( get<str_>( keypad.front() ) == "+" );
- BOOST_ASSIGN_V2_CHECK( get<int>( keypad.back() ) == 9 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<str_>( keypad.front() ) == "+" );
+ BOOST_ASSIGN_V2_CHECK( boost::get<int>( keypad.back() ) == 9 );
             //]
- BOOST_ASSIGN_V2_CHECK( get<str_>( keypad[ 5 ] ) == "." );
- BOOST_ASSIGN_V2_CHECK( get<int>( keypad[ 6 ] ) == 0 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<str_>( keypad[ 5 ] ) == "." );
+ BOOST_ASSIGN_V2_CHECK( boost::get<int>( keypad[ 6 ] ) == 0 );
         }
         {
             //[test_put_ragged
             typedef double data_; typedef std::vector<data_> uneven_;
             uneven_ a( 3 ); a[0] = 0.71; a[1] = 0.63; a[2] = 0.85;
             uneven_ b( 4 ); b[0] = 0.61; b[1] = 0.69; b[2] = 0.92; b[3] = 0.55;
- array<uneven_, 4> ragged;
+ boost::array<uneven_, 4> ragged;
             as2::put( ragged )
                 ( boost::begin( a ), boost::end( a ) )
                 ( b )
@@ -100,7 +100,7 @@
             //]
             BOOST_ASSIGN_V2_CHECK( ragged[1].size() == b.size() );
             BOOST_ASSIGN_V2_CHECK( ragged[2].size() == 1 );
- data_ eps = numeric::bounds<data_>::smallest();
+ data_ eps = boost::numeric::bounds<data_>::smallest();
             BOOST_ASSIGN_V2_CHECK( fabs( ragged[0].front() - a.front() ) < eps );
             BOOST_ASSIGN_V2_CHECK( fabs( ragged[0].back() - a.back() ) < eps );
             BOOST_ASSIGN_V2_CHECK( fabs( ragged[1].front() - b.front() ) < eps );
@@ -135,18 +135,18 @@
             //[test_put_area_codes
             typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY";
             typedef int code_;
- typedef tuple<state_/*<<Notice the [*reference]>>*/&, code_> data_;
+ typedef boost::tuple<state_/*<<Notice the [*reference]>>*/&, code_> data_;
             std::deque< data_ > region;
             as2::put( region )
                 ( ny, 212 )( ny, 718 )( ny, 516 )( ny, 914 )
                 ( nj, 210 )( nj, 908 )( nj, 609 )
                 ( ct, 203 );
 
- BOOST_ASSIGN_V2_CHECK( get<0>( region.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( get<1>( region.back() ) == 203 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<0>( region.front() ) == ny );
+ BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.back() ) == 203 );
             //]
- BOOST_ASSIGN_V2_CHECK( get<1>( region.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( get<0>( region.back() ) == ct );
+ BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.front() ) == 212 );
+ BOOST_ASSIGN_V2_CHECK( boost::get<0>( region.back() ) == ct );
         }
         //SET
         {
@@ -160,7 +160,7 @@
             benchmark.insert( "baz" );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     set | as2::delay_csv_put(
                         as2::csv_deque<word_>( "foo", "bar", "baz" )
                     ),
@@ -207,8 +207,7 @@
             typedef const size_ dim_;
             dim_ dim1 = 2, dim2 = 3, dim3 = 4;
 
- using boost::extents;
- array3_ array3( extents[dim1][dim2][dim3] );
+ array3_ array3( boost::extents[dim1][dim2][dim3] );
 
             as2::csv_put(
                 array3,
@@ -225,7 +224,7 @@
             for( size_ i1 = 0; i1 < dim1; i1++ )
             {
                 for( size_ i2 = 0; i2 < dim2; i2++ )
- {
+ {
                     for( size_ i3 = 0; i3 < dim3; i3++ )
                     {
                         BOOST_ASSIGN_V2_CHECK( array3[ i1 ][ i2 ][ i3 ] == i++ );
@@ -235,10 +234,9 @@
 
             //]
 
- using boost::indices;
- typedef boost::multi_array_types::index_range range;
+ typedef boost::multi_array_types::index_range range_;
             array3_::array_view<2>::type view =
- array3[ indices[1][range(0,2)][range(1,3)] ];
+ array3[ boost::indices[1][range_(0,2)][range_(1,3)] ];
 
             as2::csv_put(
                 view,
@@ -267,11 +265,11 @@
             as2::csv_put( cb, 1, 2, 3 );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(cb, as2::csv_deque(1, 2, 3) )
+ boost::range::equal(cb, as2::csv_deque(1, 2, 3) )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
                     as2::csv_deque(3, 4, 5)
                 )

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -26,8 +26,7 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             
             //[test_ref_array_temporaries
@@ -35,7 +34,7 @@
             ar[0] = 1; ar[1] = 10; ar[2] = 100;
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     as2::ref::array( 1 )( 10 )( 100 ),
                     ar
                 )
@@ -63,8 +62,8 @@
             }
             //]
             {
- T& a = ( *begin( ar4 ) );
- T& b = *next(boost::begin( ar4 ), ar4.size() - 1 );
+ T& a = ( *boost::begin( ar4 ) );
+ T& b = *boost::next(boost::begin( ar4 ), ar4.size() - 1 );
 
                 BOOST_ASSIGN_V2_CHECK( &a == &w );
                 BOOST_ASSIGN_V2_CHECK( &b == &z );

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/aux_/convert_traits.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -21,8 +21,7 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         namespace ns = as2::ref::convert_traits::checking;
         {
             ns::same_value_type::do_check<int>();

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/csv_array.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/csv_array.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/csv_array.cpp 2011-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -26,15 +26,14 @@
 
     void test()
     {
- using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = boost::assign::v2;
         {
             //[test_ref_csv_array_temporaries
             boost::array<int, 3> ar;
             ar[0] = 1; ar[1] = 10; ar[2] = 100;
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
+ boost::range::equal(
                     as2::ref::csv_array( 1, 10, 100 ),
                     ar
                 )
@@ -61,8 +60,8 @@
                 BOOST_ASSIGN_V2_CHECK( &back == &z );
             }
             {
- T& front = ( *begin( ar ) );
- T& back = *next( boost::begin( ar ), 2 );
+ T& front = ( *boost::begin( ar ) );
+ T& back = *boost::next( boost::begin( ar ), 2 );
 
                 BOOST_ASSIGN_V2_CHECK( &front == &x );
                 BOOST_ASSIGN_V2_CHECK( &back == &z );

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-04-24 20:54:32 EDT (Sun, 24 Apr 2011)
@@ -89,18 +89,21 @@
             //[tutorial_chain
             std::vector<int> source( 8 ); boost::iota( source, 1 );
             
- array<int, 5> copies; int x, y, z;
+ array<int, 4> head; int t, a, i, l;
             boost::copy(
                 source,
                 boost::begin(
- copies | _chain(
- ref::csv_array( x, y, z ) | ref::_get
+ head | _chain(
+ ref::csv_array( t, a, i, l ) | ref::_get
                     )
                 )
             );
 
- assert( range::equal( copies, csv_deque(1, 2, 3, 4, 5) ) );
- assert( x == 6 ); assert( y == 7 ); assert( z == 8 );
+ assert( range::equal( head, csv_deque( 1, 2, 3, 4 ) ) );
+ assert( t == 5 );
+ assert( a == 6 );
+ assert( i == 7 );
+ assert( l == 8 );
             //]
         }
         {


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