Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71086 - in sandbox/assign_v2: boost/assign boost/assign/v2/conversion boost/assign/v2/detail/config boost/assign/v2/option boost/assign/v2/option/modifier boost/assign/v2/put libs/assign/v2 libs/assign/v2/test libs/assign/v2/test/option libs/assign/v2/test/put libs/assign/v2/test/unit_testing
From: erwann.rogard_at_[hidden]
Date: 2011-04-07 15:49:06


Author: e_r
Date: 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
New Revision: 71086
URL: http://svn.boost.org/trac/boost/changeset/71086

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2.hpp | 1
   sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp | 94 +++++++++++++++++++--------
   sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp | 56 ++++++++++++---
   sandbox/assign_v2/boost/assign/v2/conversion/deduce_tag.hpp | 5
   sandbox/assign_v2/boost/assign/v2/detail/config/limit_csv_arity.hpp | 3
   sandbox/assign_v2/boost/assign/v2/option/data.hpp | 8 ++
   sandbox/assign_v2/boost/assign/v2/option/list.hpp | 2
   sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp | 8 +
   sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp | 8 ++
   sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp | 6 +
   sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp | 6 +
   sandbox/assign_v2/boost/assign/v2/option/modifier/row_major.hpp | 23 ++++--
   sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp | 56 ++++++++--------
   sandbox/assign_v2/libs/assign/v2/test/chain.cpp | 59 +++++++----------
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp | 117 +++++++++++++++++++++++-----------
   sandbox/assign_v2/libs/assign/v2/test/option/data.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp | 4
   sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp | 20 ++--
   sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp | 4
   sandbox/assign_v2/libs/assign/v2/test/put/put.cpp | 134 ++++++++++++++++++++--------------------
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 | 1
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/option.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp | 42 ------------
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 23 ++---
   24 files changed, 384 insertions(+), 300 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -15,7 +15,6 @@
 #include <boost/assign/v2/detail.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/assign/v2/option.hpp>
-#include <boost/assign/v2/pipe.hpp>
 #include <boost/assign/v2/put.hpp>
 #include <boost/assign/v2/ref.hpp>
 

Modified: sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -10,7 +10,8 @@
 #ifndef BOOST_ASSIGN_V2_CONVERSION_CONVERT_ER_2010_HPP
 #define BOOST_ASSIGN_V2_CONVERSION_CONVERT_ER_2010_HPP
 #include <boost/assign/v2/detail/pp/ignore.hpp>
-#include <boost/assign/v2/put/put.hpp>
+#include <boost/assign/v2/detail/keyword.hpp>
+#include <boost/assign/v2/put/csv_put.hpp>
 #include <boost/range/algorithm/for_each.hpp>
 
 namespace boost{
@@ -27,56 +28,91 @@
 namespace conversion_aux{
 
     template<typename C, typename R>
- C convert(R const& r, convert_tag::put)
+ C csv_put_copy(C& cont, R const& range)
     {
- C cont;
- return ::boost::for_each( r, put( cont ) ).container();
+ csv_put( cont, as_arg_list( range ) );
+ return cont;
+ }
+
+ template<typename C, typename Arg>
+ Arg const& initializer( Arg const& arg )
+ {
+ return arg;
+ }
+
+ template<typename C, typename Arg, typename R>
+ C dispatch(Arg const& arg, R const& range, convert_tag::put)
+ {
+ C cont( initializer<C>( arg ) );
+ return csv_put_copy( cont, range );
     }
 
     template<typename C, typename R>
- C convert(R const& r, convert_tag::copy)
+ C dispatch(nil_, R const& range, convert_tag::put)
     {
- return C( boost::begin( r ), boost::end( r ) );
+ C cont; return csv_put_copy( cont, range );
     }
 
+ template<typename C, typename R>
+ C dispatch(nil_, R const& r, convert_tag::copy)
+ {
+ return C( boost::begin( r ), boost::end( r ) );
+ }
 
     template<typename C, typename R>
     struct deduce_tag;
 
- template<typename C, typename R>
- C convert(R const& r)/*<-*/
+ template<typename C, typename Arg, typename R>
+ C dispatch(Arg const& arg, R const& r)/*<-*/
     {
- typedef typename conversion_aux::deduce_tag<C, R>::type tag_;
- return conversion_aux::convert<C>( r, tag_() );
+ typedef typename deduce_tag<C, R>::type tag_;
+ return dispatch<C>( arg, r, tag_() );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+
 //->
 
- template<typename C>
- struct convert_adapter/*<-*/{}/*->*/;
+ template<typename C, typename Arg = nil_>
+ struct convert/*<-*/{
+
+ convert(){}
+ convert(Arg arg):arg_( arg ){}
+
+ Arg const& arg()const{ return this->arg_; }
+
+ private:
+ mutable Arg arg_;
     
- template<typename R, typename C>
- C operator|( R const& r, convert_adapter<C> )/*<-*/
+ }/*->*/;
+
+ template<typename R, typename C, typename Arg>
+ C operator|( R const& r, convert<C, Arg> const& adapter)/*<-*/
     {
- return convert<C>( r );
+ return dispatch<C>( adapter.arg(), r );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
 }// conversion_aux
-namespace result_of{
 
- template<
- typename C // Container
- , typename R // Range
- >
- struct convert/*<-*/{ typedef C type; }/*->*/;
-
-}//result_of
-
-template<typename C>
-conversion_aux::convert_adapter<C> convert()/*<-*/
-{
- return conversion_aux::convert_adapter<C>();
-}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ template<typename C, typename Arg = nil_>
+ struct convert/*<-*/
+ : conversion_aux::convert<C, Arg>
+ {
+
+ typedef conversion_aux::convert<C> super_t;
+
+ convert()/*<-*/{}/*->*/
+ convert(Arg const& arg)
+ : super_t( arg )
+ {}
+
+ template<typename Arg1>
+ convert<C, Arg1>
+ operator+=(Arg1 const& arg1)
+ {
+ return convert<C, Arg1>( arg1 );
+ }
+
+ }/*->*/;
 
 //]
 }// v2

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -10,11 +10,12 @@
 #ifndef BOOST_ASSIGN_V2_CONVERSION_CONVERTER_ER_2010_HPP
 #define BOOST_ASSIGN_V2_CONVERSION_CONVERTER_ER_2010_HPP
 #include <boost/assign/v2/detail/pp/ignore.hpp>
-#include <boost/assign/v2/ref/wrapper.hpp>
 #include <boost/assign/v2/conversion/convert.hpp>
 #include <boost/call_traits.hpp>
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/iterator_range.hpp>
 #include <boost/type_traits/add_const.hpp>
 
 namespace boost{
@@ -23,19 +24,27 @@
 //[syntax_conversion_converter
 namespace conversion_aux{
 
- template<typename R>
+ template<typename R, typename Arg = nil_>
     class converter
     {
-//<-
- typedef typename ref::copy_wrapper<
- typename boost::add_const<R>::type
- >::type wrapper_;
-//->
+
+ typedef boost::iterator_range<
+ typename boost::range_iterator<
+ typename boost::add_const<R>::type
+ >::type
+ > source_type;
 
         public:
 
- explicit converter(typename call_traits<R>::param_type r)/*<-*/
- : w( r )
+ explicit converter(
+ Arg const& arg,
+ typename call_traits<R>::param_type source
+ )/*<-*/
+ : arg_( arg ), source_( boost::make_iterator_range( source ) )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ explicit converter(typename call_traits<R>::param_type source)/*<-*/
+ : source_( boost::make_iterator_range( source ) )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
         template<typename C>
@@ -47,22 +56,24 @@
         template<typename C>
         C type()const/*<-*/
         {
- return conversion_aux::convert<C>( this->w.get() );
+ typedef convert<C, Arg> convert_;
+ return this->source_ | convert_( this->arg_ );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
 //<-
         private:
- wrapper_ w;
+ Arg arg_;
+ source_type source_;
 //->
     };
 
 }// conversion_aux
 namespace result_of{
 
- template<typename R>
+ template<typename R, typename Arg = nil_>
     struct converter/*<-*/
     {
- typedef conversion_aux::converter<R> type;
+ typedef conversion_aux::converter<R, Arg> type;
     }/*->*/;
 
 }//result_of
@@ -74,6 +85,13 @@
         return result_( r );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+ template<typename Arg, typename R>
+ typename result_of::converter<R, Arg>::type
+ converter(Arg const& arg, R const& r)/*<-*/{
+ typedef typename result_of::converter<R, Arg>::type result_;
+ return result_( arg, r );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
 //]
 }// v2
 }// assign
@@ -100,6 +118,18 @@
     {\
         return ::boost::assign::v2::converter( range );\
     }\
+ template<typename Arg, BOOST_PP_SEQ_ENUM(\
+ BOOST_PP_SEQ_TRANSFORM(\
+ BOOST_ASSIGN_V2_CONVERSION_CONVERTER_NAME_LOOKUP_PARAM,\
+ ~,\
+ Seq\
+ )\
+ )>\
+ typename ::boost::assign::v2::result_of::converter<R, Arg>::type \
+ converter(Arg const& arg, R const& range )\
+ {\
+ return ::boost::assign::v2::converter( arg, range );\
+ }\
 /**/
 
 

Modified: sandbox/assign_v2/boost/assign/v2/conversion/deduce_tag.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/conversion/deduce_tag.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/conversion/deduce_tag.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -25,8 +25,9 @@
 
 #define BOOST_ASSIGN_V2_SWITCH_TAG conversion
 BOOST_ASSIGN_V2_SWITCH_CASE(0, container_aux::is_array, convert_tag::put)
-BOOST_ASSIGN_V2_SWITCH_CASE(1, container_aux::has_push_deduced_value, convert_tag::put)
-BOOST_ASSIGN_V2_SWITCH_CASE_DEFAULT(2, convert_tag::copy)
+BOOST_ASSIGN_V2_SWITCH_CASE(1, container_aux::is_multi_array, convert_tag::put)
+BOOST_ASSIGN_V2_SWITCH_CASE(2, container_aux::has_push_deduced_value, convert_tag::put)
+BOOST_ASSIGN_V2_SWITCH_CASE_DEFAULT(3, convert_tag::copy)
 #undef BOOST_ASSIGN_V2_SWITCH_TAG
 
 namespace conversion_aux{

Modified: sandbox/assign_v2/boost/assign/v2/detail/config/limit_csv_arity.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/detail/config/limit_csv_arity.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/detail/config/limit_csv_arity.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -7,8 +7,6 @@
 // Boost Software License, Version 1.0. (See accompanying file //
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
 //////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_ASSIGN_V2_LIMIT_CSV_ARITY_ER_2010_HPP
-#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY_ER_2010_HPP
 #ifndef BOOST_ASSIGN_V2_LIMIT_CSV_ARITY
 //[limit_csv_arity
 /* n = BOOST_ASSIGN_V2_CSV_LIMIT_ARITY
@@ -22,4 +20,3 @@
 #define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 20
 //]
 #endif // BOOST_ASSIGN_V2_LIMIT_CSV_ARITY
-#endif // BOOST_ASSIGN_V2_LIMIT_CSV_ARITY_ER_2010_HPP
\ No newline at end of file

Modified: sandbox/assign_v2/boost/assign/v2/option/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/data.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/data.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -84,7 +84,13 @@
         
 }// result_of
 
- template<typename F/*<-*/= ignore_/*->*/>
+ // F is a functor or either of the keywors:
+ // element_
+ // key_
+ // map_
+ // use_default_
+ // value_
+ template<typename F = ignore_>
     struct option_data/*<-*/
         : option_crtp<
             option_data<F>

Modified: sandbox/assign_v2/boost/assign/v2/option/list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/list.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -202,7 +202,7 @@
 
 }// result_of
 }// interpreter_aux
- typedef interpreter_aux::empty_list_option empty_list_option_;
+ typedef interpreter_aux::empty_list_option empty_list_option_;
 namespace{
     empty_list_option_ _list_option = empty_list_option_();
 }

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -39,15 +39,17 @@
         public:
         interpreter_modifier(){}
         interpreter_modifier( ignore_, ignore_ ){}
-
+//<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
 #define BOOST_ASSIGN_V2_arg T&& t
 #define BOOST_ASSIGN_V2_forward std::forward<T>( t )
+//<-
 #else
 #define BOOST_ASSIGN_V2_arg T& t
 #define BOOST_ASSIGN_V2_forward t
 #endif
-
+//->
         template<typename C, typename T>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, data_tag::value )const
         {
@@ -79,8 +81,10 @@
 
     };
 
+//<-
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
+//->
 
 }// interpreter_aux
 BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(insert)

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -33,13 +33,17 @@
 }// modifier_tag
 namespace interpreter_aux{
 
+//<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
 #define BOOST_ASSIGN_V2_arg T&& t
 #define BOOST_ASSIGN_V2_forward std::forward<T>( t )
+//<-
 #else
 #define BOOST_ASSIGN_V2_arg T& t
 #define BOOST_ASSIGN_V2_forward t
 #endif
+//->
                 
     template<typename Arg>
     class interpreter_modifier< modifier_tag::iterate<Arg> >/*<-*/
@@ -52,7 +56,7 @@
         public:
                     
         interpreter_modifier()
- : ptr( new arg_() )
+ : ptr( new arg_() )
         {}
         explicit interpreter_modifier(
             ignore_,
@@ -78,8 +82,10 @@
 
     }/*->*/;
 
+//<-
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
+//->
 
 }// interpreter_aux
 BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(iterate)

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -44,13 +44,17 @@
         ) : ptr( new arg_( arg ) )
         {}
 
+//<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
 #define BOOST_ASSIGN_V2_arg T&& t
 #define BOOST_ASSIGN_V2_forward std::forward<T>( t )
+//<-
 #else
 #define BOOST_ASSIGN_V2_arg T& t
 #define BOOST_ASSIGN_V2_forward t
 #endif
+//->
 
         template<typename C, typename T>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, data_tag::storage )const
@@ -58,8 +62,10 @@
             cont[ t/*key*/ ] = (*this->ptr)( cont[ BOOST_ASSIGN_V2_forward ] );
         }
 
+//<-
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
+//->
 
         private:
         ptr_ ptr;

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -43,13 +43,17 @@
             : inner_( inner ), n_( n )
         {}
 
+//<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
 #define BOOST_ASSIGN_V2_arg T&& t
 #define BOOST_ASSIGN_V2_forward std::forward<T>( t )
+//<-
 #else
 #define BOOST_ASSIGN_V2_arg T& t
 #define BOOST_ASSIGN_V2_forward t
 #endif
+//->
         template<typename C, typename T, typename DataTag>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, DataTag tag )const
         {
@@ -57,8 +61,10 @@
             while(m--) this->inner_.impl( cont, BOOST_ASSIGN_V2_forward, tag );
         }
 
+//<-
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
+//->
 
         size_type const& size()const{ return this->n_; }
 

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/row_major.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/row_major.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/row_major.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -21,7 +21,7 @@
 #include <utility>
 #endif
 
-#include <iostream>
+
 
 namespace boost{
 namespace assign{
@@ -34,11 +34,14 @@
 }// modifier_tag
 namespace interpreter_aux{
 
+//<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+//->
 #define BOOST_ASSIGN_V2_arg T&& t
 #define BOOST_ASSIGN_V2_forward std::forward<T>( t )
+//<-
 #else
-#define BOOST_ASSIGN_V2_arg T const& t
+#define BOOST_ASSIGN_V2_arg T& t
 #define BOOST_ASSIGN_V2_forward t
 #endif
 
@@ -77,8 +80,10 @@
         row_major_::assign( array, index, BOOST_ASSIGN_V2_forward );
     }
 
+//->
+
     template<typename Arg>
- class interpreter_modifier< modifier_tag::row_major<Arg> >
+ class interpreter_modifier< modifier_tag::row_major<Arg> >/*<-*/
     {
 
         typedef Arg arg_;
@@ -86,29 +91,29 @@
 
         public:
         interpreter_modifier()
- : ptr( new arg_() )
+ : ptr( new arg_() )
         {}
         interpreter_modifier(
             ignore_,
             typename boost::call_traits<arg_>::param_type arg
         )
- : ptr( new arg_( arg ) )
+ : ptr( new arg_( arg ) )
         {}
 
         template<typename C, typename T>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, data_tag::value )const
         {
- int n = (*this->ptr)();
- std::cout << "n = " << n << std::endl;
- row_major_assign( cont, n, BOOST_ASSIGN_V2_forward );
+ row_major_assign( cont, (*this->ptr)(), BOOST_ASSIGN_V2_forward );
         }
 
         private:
         mutable ptr_ ptr;
- };
+ }/*->*/;
 
+//<-
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
+//->
     
 }// interpreter_aux
 //]

Modified: sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -45,25 +45,25 @@
 
     template<typename C, typename F, typename MTag, typename DTag>
     struct if_csv_ready/*<-*/
- : ::boost::mpl::identity<
- put_interpreter<C, F, MTag, DTag>
- >
+ : ::boost::mpl::identity<
+ put_interpreter<C, F, MTag, DTag>
+ >
     {}/*->*/;
 
     template<typename C, typename F, typename MTag, typename DTag>
     struct else_csv_ready/*<-*/
- : result_of::option_data<
- put_interpreter<C, F, MTag, DTag>, C, value_
- >
+ : result_of::option_data<
+ put_interpreter<C, F, MTag, DTag>, C, value_
+ >
     {}/*->*/;
 
     template<typename C, typename F, typename MTag, typename DTag>
     struct make_csv_ready/*<-*/
- : ::boost::mpl::eval_if<
- csv_ready<F>,
- if_csv_ready<C, F, MTag, DTag>,
- else_csv_ready<C, F, MTag, DTag>
- >
+ : ::boost::mpl::eval_if<
+ csv_ready<F>,
+ if_csv_ready<C, F, MTag, DTag>,
+ else_csv_ready<C, F, MTag, DTag>
+ >
     {}/*->*/;
 
 }// result_of
@@ -136,27 +136,27 @@
 
     template<typename R, typename Os = empty_list_option>
     struct delayed_csv_put/*<-*/
- : Os, as_arg_list_adapter<R>
+ : Os, as_arg_list_adapter<R>
     {
 
- typedef Os super1_t;
- typedef as_arg_list_adapter<R> super2_t;
+ typedef Os super1_t;
+ typedef as_arg_list_adapter<R> super2_t;
 
         explicit delayed_csv_put(R& r)
- : super2_t( r )
+ : super2_t( r )
         {}
 
         explicit delayed_csv_put(Os options, R& r)
- : super1_t( options ), super2_t( r )
+ : super1_t( options ), super2_t( r )
         {}
 
- template<typename C>
- C& apply(C& cont)const
+ template<typename C>
+ C& apply(C& cont)const
         {
- make_csv_ready(
- put( cont ) % static_cast<super1_t const&>( *this )
+ make_csv_ready(
+ put( cont ) % static_cast<super1_t const&>( *this )
             )(
- static_cast<super2_t const&>( *this )
+ static_cast<super2_t const&>( *this )
             );
             
             return cont;
@@ -174,10 +174,10 @@
 
 namespace result_of{
 
- template<typename R, typename Os = empty_list_option>
- struct delay_csv_put/*<-*/
+ template<typename R, typename Os = empty_list_option>
+ struct delay_csv_put/*<-*/
     {
- typedef delayed_csv_put<R, Os> type;
+ typedef delayed_csv_put<R, Os> type;
     }/*->*/;
 
 
@@ -209,13 +209,13 @@
 #endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
 
- using interpreter_aux::delay_csv_put;
+ using interpreter_aux::delay_csv_put;
 
 namespace result_of{
 
- template<typename R, typename Os = empty_list_option_>
- struct delay_csv_put
- : interpreter_aux::result_of::delay_csv_put<R, Os>
+ template<typename R, typename Os = empty_list_option_>
+ struct delay_csv_put
+ : interpreter_aux::result_of::delay_csv_put<R, Os>
     {};
 
 }// result_of

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -11,16 +11,17 @@
 #include <vector>
 #include <list>
 #include <string>
-#include <boost/next_prior.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/range/algorithm/equal.hpp>
 #include <boost/assign/v2/include/ref/csv_array.hpp>
 #include <boost/assign/v2/include/csv_deque.hpp>
 #include <boost/assign/v2/chain/check.hpp>
 #include <boost/assign/v2/chain.hpp>
 #include <boost/assign/v2/chain/logical_and.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
 #include <libs/assign/v2/test/chain.h>
 
 namespace test_assign_v2{
@@ -41,66 +42,56 @@
         {
             //[test_chain_read
             typedef std::string T;
- array<T, 2> head; head[0] = "A"; head[1] = "B";
- std::list<T> tail; tail.push_back( "C" ); tail.push_back( "D" );
- std::vector<T> joined;
+ std::vector<T> word;
+
             copy(
- head | as2::_chain( tail ),
- std::back_inserter( joined )
+ as2::csv_deque( "O", "R" ) | as2::_chain( as2::csv_deque( "B", "I", "T" ) ),
+ std::back_inserter( word )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( joined, as2::csv_deque<T>("A", "B", "C", "D") )
+ range::equal( word, as2::csv_deque<T>("O", "R", "B", "I", "T") )
             );
             //]
         }
         {
             //[test_chain_write
- typedef std::string word; std::vector<word> words( 6 );
- words[0] = "foo"; words[1] = "bar"; words[2] = "baz";
- words[3] = "qux"; words[4] = "quux"; words[5] = "grault";
- array<word, 3> head; std::list<word> tail( 3 );
+ typedef int T; array<T, 3> head; std::list<T> tail( 2 );
             
             copy(
- words,
+ as2::csv_deque( 1, 2, 3, 4, 5 ),
                 boost::begin( head | as2::_chain( tail ) )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
- head,
- as2::csv_deque<word>( "foo", "bar", "baz" )
- )
+ range::equal( head, as2::csv_deque( 1, 2, 3 ) )
             );
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
- tail,
- as2::csv_deque<word>( "qux", "quux", "grault" )
- )
+ range::equal( tail, as2::csv_deque( 4, 5 ) )
             );
             //]
         }
         // Boost.Assign.v2 containers
         {
             //[test_chain_write_refs
- /*<< Needed to bring && into scope >>*/ using namespace assign::v2;
- std::vector<int> iota8( 8 );
- for(int i = 0; i < 8; i++){ iota8[i] = 1 + i; }
- array<int, 5> iota5; int six, seven, eight;
+ /*<< Needed to bring && into scope >>*/
+ std::vector<int> source( 8 ); iota(source, 1);
+ array<int, 5> copies; int x, y, z;
             
+ /*<<Brings `&&` to scope>>*/using namespace assign::v2;
             boost::copy(
- iota8,
+ source,
                 boost::begin(
- iota5 && (/*<< rvalue! >>*/ as2::ref::csv_array( six, seven, eight ) | as2::ref::_get )
+ copies && (/*<< rvalue! >>*/ as2::ref::csv_array( x, y, z ) | as2::ref::_get )
                 )
             );
 
             BOOST_ASSIGN_V2_CHECK(
- range::equal( iota5, as2::csv_deque( 1, 2, 3, 4, 5 ) )
+ range::equal( copies, as2::csv_deque( 1, 2, 3, 4, 5 ) )
             );
- BOOST_ASSIGN_V2_CHECK( six == 6 );
- BOOST_ASSIGN_V2_CHECK( seven == 7 );
- BOOST_ASSIGN_V2_CHECK( eight == 8 );
+ BOOST_ASSIGN_V2_CHECK( x == 6 );
+ BOOST_ASSIGN_V2_CHECK( y == 7 );
+ BOOST_ASSIGN_V2_CHECK( z == 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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -17,7 +17,10 @@
 #include <boost/assign/v2/conversion/check.hpp>
 #include <boost/assign/v2/ref/array.hpp>
 #include <boost/assign/v2/deque.hpp>
+#include <boost/multi_array.hpp>
 #include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm_ext/iota.hpp>
+#include <boost/range/iterator_range.hpp>
 #include <libs/assign/v2/test/conversion.h>
 
 namespace test_assign_v2{
@@ -40,45 +43,70 @@
 
         // External containers (fully qualified)
         {
- //[test_conversion_vec_array
- std::vector<int> r( 3 ); r[0] = 1 ; r[1] = 10; r[2] = 100;
-
- typedef array<int, 3> ar_;
- ar_ const& ar = ( r | as2::convert<ar_>() );
+ //[tutorial_convert
+ typedef std::stack<int> C;
             
- BOOST_ASSIGN_V2_CHECK(
- range::equal( ar, as2::csv_deque( 1 , 10, 100 ) )
+ C lifo; lifo.push( 3 ); lifo.push( 2 ); lifo.push( 1 );
+
+ BOOST_ASSIGN_V2_CHECK(
+ ( as2::csv_deque( 3, 1, 1 ) | as2::convert<C>() ) < lifo
             );
             //]
+
         }
         {
- //[test_conversion_vec_stack
- std::vector<int> r( 3 ); r[0] = 1 ; r[1] = 10; r[2] = 100;
+ //[test_converter
+ std::list<int> source( 3 ); iota( source, 1 );
             
- std::stack<int> lifo = as2::converter( r );
+ std::queue<int> fifo = as2::converter( source );
             
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 100 );
+ BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
+ BOOST_ASSIGN_V2_CHECK( fifo.back() == 3 );
             //]
         }
         {
- //[test_conversion_stl
- typedef int T; typedef std::vector<T> R;
- R r( 3 ); r[0] = 1 ; r[1] = 10; r[2] = 100;
- f< std::vector<T> >( as2::converter( r ), r );
- f< std::deque<T> >( as2::converter( r ), r );
- f< std::list<T> >( as2::converter( r ), r );
- f< std::stack<T> >( as2::converter( r ), r );
- f< std::queue<T> >( as2::converter( r ), r );
+ //[test_converter_f
+ typedef int T; typedef std::vector<T> R;
+ R benchmark( 10 ); iota( benchmark, 0 );
+
+ as2::result_of::converter<R>::type source( benchmark );
+
+ {
+ typedef boost::array<T, 10> C;
+ f<C>( source, benchmark );
+ }
+ {
+ typedef std::deque<T> C;
+ f<C>( source, benchmark );
+ }
+ {
+ typedef std::list<T> C;
+ f<C>( source, benchmark );
+ }
+ {
+ typedef std::queue<T> C;
+ f<C>( source, benchmark );
+ }
+ {
+ typedef std::stack<T> C;
+ f<C>( source, benchmark );
+ }
+ {
+ typedef std::vector<T> C;
+ f<C>( source, benchmark );
+ }
             //]
         }
         {
             //[test_conversion_matrix3x3
             const int sz = 3; typedef array<int, sz> row_;
+
+ as2::convert<row_> as_row;
             array<row_, sz> matrix3x3 = converter(
                 as2::ref::array
- ( as2::ref::csv_array( 1, 2, 3 ) | as2::convert<row_>() )
- ( as2::ref::csv_array( 4, 5, 6 ) | as2::convert<row_>() )
- ( as2::ref::csv_array( 7, 8, 9 ) | as2::convert<row_>() )
+ ( as2::ref::csv_array( 1, 2, 3 ) | as_row )
+ ( as2::ref::csv_array( 4, 5, 6 ) | as_row )
+ ( as2::ref::csv_array( 7, 8, 9 ) | as_row )
             );
             
             for(int i = 0; i < 9; i++)
@@ -89,35 +117,46 @@
         }
         // Boost.Assign.2.0 containers - name lookup
         {
- //[test_conversion_as2_deque_array
- std::vector<int> r( 3 ); r[0] = 1 ; r[1] = 10; r[2] = 100;
- typedef array<int, 3> ar_;
- ar_ const& ar = ( as2::csv_deque( 1 , 10, 100 ) | as2::convert<ar_>() );
+ //[test_converter_from_deque
+ typedef 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 , 10, 100 ) )
+ range::equal( ar, as2::csv_deque( 1, 2, 3, 4, 5 ) )
             );
             //]
         }
         {
- //[test_conversion_ref_array_stack
- std::stack<int> lifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::ref::array( 1 )( 10 )( 100 ) );
-
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 100 );
- //]
- }
- {
- //[test_conversion_ref_array_queue
- std::queue<int> fifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::ref::csv_array( 1 , 10, 100 ) );
+ //[test_converter_from_ref_array
+ std::queue<int> fifo = /*<<Notice unqualified>>*/converter( as2::ref::csv_array( 1, 2, 3, 4, 5 ) );
             
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
             //]
         }
         {
- //[test_conversion_as2_deque_stack
- std::stack<int> lifo = /*<<Notice unqualified (name lookup)>>*/converter( as2::csv_deque( 1 , 10, 100 ) );
+ //[test_converter_multi_array
+ typedef boost::multi_array<int, 2> array2_;
+ typedef array2_::size_type size_;
+ typedef size_ const dim_;
+ dim_ dim1 = 3, dim2 = 3;
+ array2_ array2 = converter(
+ extents[dim1][dim2],
+ as2::csv_deque(-1, +1, -1, +1, -1, +1, -1, +1, -1)
+ );
             
- BOOST_ASSIGN_V2_CHECK( lifo.top() == 100 );
+ const int benchmark [] = {
+ -1, +1, -1,
+ +1, -1, +1,
+ -1, +1, -1
+ };
+ 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 )
+ )
+ );
             //]
         }
     }

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -58,7 +58,7 @@
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
                     as2::csv_deque<int>(
- as2::_data = ( lambda::var( k ) *= lambda::_1 ),
+ as2::_data = ( lambda::var( k ) *= lambda::_1 ),
                         1, 2, 3, 4, 5
                     ),
                     as2::csv_deque( 1, 2, 6, 24, 120 )

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -67,9 +67,9 @@
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
                     (
- as2::deque<int>( as2::as_arg_list( source ) )
+ as2::deque<int>( as2::as_arg_list( source ) )
                         % option
- )( 1 )( 3 )( 5 )( 7 )( 9 ),
+ )( 1 )( 3 )( 5 )( 7 )( 9 ),
                     as2::csv_deque( +1, -1, +1, -1, +1, -1, +1, -1, +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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -38,24 +38,24 @@
         dim_ dim1 = 3, dim2 = 3;
         array2_ array2( extents[dim1][dim2] );
 
- int k = -2;
+ int k = -2;
         BOOST_AUTO( option, as2::_row_major = ( 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 );
+ as2::csv_put( array2, option, -1, -1, -1, -1, -1 );
+ k = -1; as2::csv_put( array2, option, +1, +1, +1, +1 );
         
- const int benchmark [] = {
- -1, +1, -1,
+ const int benchmark [] = {
+ -1, +1, -1,
             +1, -1, +1,
             -1, +1, -1
         };
         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_ASSIGN_V2_CHECK(
+ range::equal(
+ make_iterator_range( array2.data(), n + array2.data() ),
+ make_iterator_range( benchmark, n + benchmark )
             )
         );
- //]
+ //]
     }
 
 }// xxx_row_major

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -56,14 +56,14 @@
             
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
- cb | as2::delay_csv_put( as2::_push_front, as2::csv_deque( 3, 2, 1 ) ),
+ 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(
- cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
+ cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
                     as2::csv_deque( 3, 4, 5 )
                 )
             );

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -19,13 +19,11 @@
 #include <string>
 #include <utility>
 
-#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
-#if !BOOST_ASSIGN_V2_ENABLE_CPP0X
-#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 30
-#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
-
 #include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/detail/traits.hpp>
+
+#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 24
+
 #include <boost/assign/v2/include/csv_deque.hpp>
 #include <boost/assign/v2/include/put.hpp>
 #include <boost/assign/v2/include/csv_put.hpp>
@@ -92,7 +90,7 @@
             uneven_ b( 4 ); b[0] = 0.61; b[1] = 0.69; b[2] = 0.92; b[3] = 0.55;
             array<uneven_, 4> ragged;
             as2::put( ragged )
- /*<<Calls `ragged.push_back( uneven_( begin( a ), end( a ) ) )`>>*/( boost::begin( a ), boost::end( a ) )
+ ( boost::begin( a ), boost::end( a ) )
                 ( b )
                 ( 1, -99.99 )
                 ( );
@@ -112,10 +110,13 @@
         }
         // SEQUENCE
         {
+ // Note that although `number( str_( "011" ) )`, for instance,
+ // is valid, `range_3bit.push_back( str_( "011" ) )` isn't
             //[test_csv_put_bitset
             typedef std::string str_; typedef std::bitset<3> number;
- std::vector<number> /*<<Note that although `number( str_( "011" ) )`, for instance, is valid, `range_3bit.push_back( str_( "011" ) )`>>*/ range_3bit;
- /*<<Calls `range_3bit.push_back( number( t ) );` for [^t = ]`str_( "000" )`[^, ..., ]`str_( "111" )`>>*/as2::csv_put( range_3bit
+ std::vector<number> range_3bit;
+ as2::csv_put(
+ range_3bit
                 , str_( "000" ), str_( "001" )
                 , str_( "010" ), str_( "011" )
                 , str_( "100" ), str_( "101" )
@@ -132,11 +133,10 @@
         {
             // http://bioinfo.mbb.yale.edu/~mbg/dom/fun3/area-codes/
             //[test_put_area_codes
- typedef const char us_state_ [3]; us_state_ ct = "CT", nj = "NJ", ny = "NY";
- typedef int area_code_;
- typedef tuple<us_state_/*<<Notice the [*reference]>>*/&, area_code_> data_;
+ typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY";
+ typedef int code_;
+ typedef tuple<state_/*<<Notice the [*reference]>>*/&, code_> data_;
             std::deque< data_ > region;
- /*<<Calls `tri_state.push_back( data_( s, c ) )` for [^( s, c ) =( ny, 212 )...( ct, 203 )]>>*/
             as2::put( region )
                 ( ny, 212 )( ny, 718 )( ny, 516 )( ny, 914 )
                 ( nj, 210 )( nj, 908 )( nj, 609 )
@@ -160,9 +160,9 @@
             benchmark.insert( "baz" );
             
             BOOST_ASSIGN_V2_CHECK(
- range::equal(
- set | as2::delay_csv_put(
- as2::csv_deque<word_>( "foo", "bar", "baz" )
+ range::equal(
+ set | as2::delay_csv_put(
+ as2::csv_deque<word_>( "foo", "bar", "baz" )
                     ),
                     benchmark
                 )
@@ -200,64 +200,64 @@
         }
         // MULTI-ARRAY
         {
- //[test_csv_put_multi_array
- typedef boost::multi_array<int, 3> array3_;
- typedef array3_::size_type size_;
+ //[test_csv_put_multi_array
+ typedef boost::multi_array<int, 3> array3_;
+ typedef array3_::size_type size_;
         
- typedef const int dim_;
+ typedef const int dim_;
             dim_ dim1 = 2, dim2 = 3, dim3 = 4;
             
- using boost::extents;
- array3_ array3( extents[dim1][dim2][dim3] );
+ using boost::extents;
+ array3_ array3( extents[dim1][dim2][dim3] );
 
- as2::csv_put(
- array3,
- 0, 1, 2, 3,
- 4, 5, 6, 7,
+ as2::csv_put(
+ array3,
+ 0, 1, 2, 3,
+ 4, 5, 6, 7,
                  8, 9, 10, 11,
 
- 12, 13, 14, 15,
- 16, 17, 18, 19,
- 20, 21, 22, 23
- );
+ 12, 13, 14, 15,
+ 16, 17, 18, 19,
+ 20, 21, 22, 23
+ );
             
- size_ i = 0;
- 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++ );
- }
- }
- }
-
- //]
-
- using boost::indices;
- typedef boost::multi_array_types::index_range range;
- array3_::array_view<2>::type view =
- array3[ indices[1][range(0,2)][range(1,3)] ];
-
- as2::csv_put(
- view,
- 99, 98,
- 97, 96
- );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- as2::csv_deque(
- view[0][0], view[0][1],
- view[1][0], view[1][1]
- ),
- as2::csv_deque(
- 99, 98,
- 97, 96
- )
- )
- );
+ size_ i = 0;
+ 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++ );
+ }
+ }
+ }
+
+ //]
+
+ using boost::indices;
+ typedef boost::multi_array_types::index_range range;
+ array3_::array_view<2>::type view =
+ array3[ indices[1][range(0,2)][range(1,3)] ];
+
+ as2::csv_put(
+ view,
+ 99, 98,
+ 97, 96
+ );
+
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal(
+ as2::csv_deque(
+ view[0][0], view[0][1],
+ view[1][0], view[1][1]
+ ),
+ as2::csv_deque(
+ 99, 98,
+ 97, 96
+ )
+ )
+ );
         
         }
         // OTHER
@@ -272,7 +272,7 @@
 
             BOOST_ASSIGN_V2_CHECK(
                 range::equal(
- cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
+ cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
                     as2::csv_deque(3, 4, 5)
                 )
             );

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/Jamfile.v2 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -22,7 +22,6 @@
     [ assign-test detail ]
     [ assign-test interpreter ]
     [ assign-test option ]
- [ assign-test pipe ]
     [ assign-test put ]
     [ assign-test ref ]
 ;

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/option.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/option.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/option.cpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -18,6 +18,7 @@
 #include <libs/assign/v2/test/option/list.cpp>
 #include <libs/assign/v2/test/option/mapped.cpp>
 #include <libs/assign/v2/test/option/repeat.cpp>
+#include <libs/assign/v2/test/option/row_major.cpp>
 #include <libs/assign/v2/test/option/std_modifier.cpp>
     
 #include <boost/test/unit_test.hpp>
@@ -33,6 +34,7 @@
         test->add( BOOST_TEST_CASE( &ns::xxx_list::test ) );
         test->add( BOOST_TEST_CASE( &ns::xxx_mapped::test ) );
         test->add( BOOST_TEST_CASE( &ns::xxx_repeat::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_row_major::test ) );
         test->add( BOOST_TEST_CASE( &ns::xxx_standard::test ) );
     }
     return test;

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/pipe.cpp 2011-04-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -1,41 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_ASSIGN_V2_TEST_UNIT_TEST_PIPE_ER_2010_CPP
-#define LIBS_ASSIGN_V2_TEST_UNIT_TEST_PIPE_ER_2010_CPP
-
-#include <boost/test/test_tools.hpp>
-#define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
-
-#include <libs/assign/v2/test/pipe/csv_put.cpp>
-#include <libs/assign/v2/test/pipe/option/data.cpp>
-#include <libs/assign/v2/test/pipe/option/iterate.cpp>
-#include <libs/assign/v2/test/pipe/option/mapped.cpp>
-#include <libs/assign/v2/test/pipe/option/repeat.cpp>
-#include <libs/assign/v2/test/pipe/option/std_modifier.cpp>
-
-#include <boost/test/unit_test.hpp>
-using boost::unit_test::test_suite;
-test_suite* init_unit_test_suite( int argc, char* argv[] )
-{
- test_suite* test = BOOST_TEST_SUITE( "BOOST_ASSIGN_V2" );
- using namespace test_assign_v2;
- {
- namespace ns = xxx_pipe;
- test->add( BOOST_TEST_CASE( &ns::xxx_csv_put::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_data::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_iterate::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_mapped::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_repeat::test ) );
- test->add( BOOST_TEST_CASE( &ns::xxx_option::xxx_std_modifier::test ) );
- }
- return test;
-}
-
-#endif // LIBS_ASSIGN_V2_TEST_UNIT_TEST_PIPE_ER_2010_CPP
+// TODO remove file
\ No newline at end of file

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-07 15:49:02 EDT (Thu, 07 Apr 2011)
@@ -35,15 +35,12 @@
         using namespace boost;
         using namespace assign::v2;
         {
- //[tutorial_assign1
+ //[tutorial_csv_put
             std::vector<int> numeric( 10 ); iota( numeric, 0 );
             typedef std::string str_; typedef variant< int, str_ > data_;
             array<data_, 16> keypad;
             
- csv_put( keypad
- , "+", "-", "*", "/", "=", "."
- , as_arg_list( numeric )
- );
+ csv_put( keypad, "+", "-", "*", "/", "=", "." , as_arg_list( numeric ) );
 
             assert( get<str_>( keypad.front() ) == "+" );
             assert( get<int>( keypad.back() ) == 9 );
@@ -57,10 +54,10 @@
                     sorted | delay_csv_put( source ),
                 lambda::_1 % 2
             );
- //]
- //[tutorial_csv_deque
+ //]
+ //[tutorial_csv_deque
             assert(
- range::equal( sorted, csv_deque(1, 3, 5, 0, 2, 4) )
+ range::equal( sorted, csv_deque(1, 3, 5, 0, 2, 4) )
             );
             //]
         }
@@ -91,7 +88,7 @@
                 source,
                 boost::begin(
                     copies | _chain(
- ref::csv_array( x, y, z ) | ref::_get
+ ref::csv_array( x, y, z ) | ref::_get
                     )
                 )
             );
@@ -106,11 +103,11 @@
             
             C fifo = converter( csv_deque( 1, 2, 3 ) );
             assert( fifo.front() == 1 ); assert( fifo.back() == 3 );
- //]
+ //]
 
             //[tutorial_convert
             assert(
- ( csv_deque( 1, 1, 3 ) | convert<C>() ) < fifo
+ ( csv_deque( 1, 1, 3 ) | convert<C>() ) < fifo
             );
             //]
         }
@@ -135,9 +132,9 @@
 
             C::size_type index = 3;
             csv_put(
- series
+ series
                 , _iterate = lambda::var( index )++
- , +2, -3, +3, -4, +4, -5 , +5
+ , +2, -3, +3, -4, +4, -5 , +5
             );
 
             assert(


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