Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r72357 - in sandbox/assign_v2: boost/assign/v2 boost/assign/v2/conversion boost/assign/v2/deque boost/assign/v2/deque/cpp03 boost/assign/v2/include boost/assign/v2/include/ref boost/assign/v2/interpreter boost/assign/v2/interpreter/cpp03 boost/assign/v2/option boost/assign/v2/option/modifier boost/assign/v2/put boost/assign/v2/put/cpp03 boost/assign/v2/ref/array boost/assign/v2/ref/aux_/list boost/assign/v2/ref/aux_/list/array boost/assign/v2/ref/aux_/list/holder boost/assign/v2/support boost/assign/v2/support/config boost/assign/v2/support/functor boost/assign/v2/support/pp boost/assign/v2/support/traits boost/assign/v2/temporary libs/assign/v2 libs/assign/v2/src libs/assign/v2/test libs/assign/v2/test/option libs/assign/v2/test/put libs/assign/v2/test/ref libs/assign/v2/test/ref/aux_ libs/assign/v2/test/support libs/assign/v2/test/unit_testing
From: erwann.rogard_at_[hidden]
Date: 2011-06-02 20:25:18


Author: e_r
Date: 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
New Revision: 72357
URL: http://svn.boost.org/trac/boost/changeset/72357

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp | 30 ++--
   sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp | 6
   sandbox/assign_v2/boost/assign/v2/deque/cpp03/csv_deque.hpp | 212 ++++++++++++++++++++---------
   sandbox/assign_v2/boost/assign/v2/deque/cpp03/deque.hpp | 25 ++-
   sandbox/assign_v2/boost/assign/v2/deque/csv_deque.hpp | 75 ++++++----
   sandbox/assign_v2/boost/assign/v2/deque/deque.hpp | 66 ++++++--
   sandbox/assign_v2/boost/assign/v2/include.hpp | 1
   sandbox/assign_v2/boost/assign/v2/include/csv_deque.hpp | 1
   sandbox/assign_v2/boost/assign/v2/include/deque.hpp | 1
   sandbox/assign_v2/boost/assign/v2/include/ref/array.hpp | 1
   sandbox/assign_v2/boost/assign/v2/include/ref/csv_array.hpp | 1
   sandbox/assign_v2/boost/assign/v2/interpreter.hpp | 1
   sandbox/assign_v2/boost/assign/v2/interpreter/as_arg_list.hpp | 98 --------------
   sandbox/assign_v2/boost/assign/v2/interpreter/cpp03/csv.hpp | 186 ++++++++++++++++++++------
   sandbox/assign_v2/boost/assign/v2/interpreter/crtp.hpp | 166 +++++++++++++++++++++---
   sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp | 275 ++++++++++++++++++++++++++++++++++-----
   sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp | 15 +-
   sandbox/assign_v2/boost/assign/v2/interpreter/fwd.hpp | 3
   sandbox/assign_v2/boost/assign/v2/option/data.hpp | 64 ++++----
   sandbox/assign_v2/boost/assign/v2/option/list.hpp | 73 ++++++----
   sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp | 42 ++---
   sandbox/assign_v2/boost/assign/v2/option/modifier/insert.hpp | 15 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp | 21 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp | 20 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/row_major.hpp | 19 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp | 13 +
   sandbox/assign_v2/boost/assign/v2/put.hpp | 1
   sandbox/assign_v2/boost/assign/v2/put/cpp03/csv_put.hpp | 128 +++++++++++++++---
   sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp | 120 +++-------------
   sandbox/assign_v2/boost/assign/v2/put/delay_csv_put.hpp | 152 ++++++++++++---------
   sandbox/assign_v2/boost/assign/v2/put/put.hpp | 81 +++++++---
   sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp | 10
   sandbox/assign_v2/boost/assign/v2/ref/array/csv_array.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/policy.hpp | 6
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/rebind.hpp | 6
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/at.hpp | 54 +++---
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp | 14 +-
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/fwd.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/holder/tail.hpp | 10
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/list.hpp | 12
   sandbox/assign_v2/boost/assign/v2/support/config/borland_workaround.hpp | 10 -
   sandbox/assign_v2/boost/assign/v2/support/config/limit_arity.hpp | 44 ------
   sandbox/assign_v2/boost/assign/v2/support/config/limit_csv_arity.hpp | 2
   sandbox/assign_v2/boost/assign/v2/support/config/limit_lvalue_const_arity.hpp | 30 ----
   sandbox/assign_v2/boost/assign/v2/support/functor/crtp_unary_and_up.hpp | 41 +++--
   sandbox/assign_v2/boost/assign/v2/support/functor/pair.hpp | 6
   sandbox/assign_v2/boost/assign/v2/support/functor/value.hpp | 13 +
   sandbox/assign_v2/boost/assign/v2/support/keyword.hpp | 32 ++--
   sandbox/assign_v2/boost/assign/v2/support/pp/parameter_list.hpp | 120 +++++++++++++++--
   sandbox/assign_v2/boost/assign/v2/support/traits.hpp | 1
   sandbox/assign_v2/boost/assign/v2/support/traits/container.hpp | 34 +++-
   sandbox/assign_v2/boost/assign/v2/temporary/variadic_args_to_indices.hpp | 52 -------
   sandbox/assign_v2/boost/assign/v2/temporary/variadic_sequence.hpp | 66 ---------
   sandbox/assign_v2/boost/assign/v2/temporary/variadic_vector.hpp | 31 ----
   sandbox/assign_v2/libs/assign/v2/src/main.cpp | 10
   sandbox/assign_v2/libs/assign/v2/test/chain.cpp | 48 +++---
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp | 74 ++++------
   sandbox/assign_v2/libs/assign/v2/test/deque.cpp | 130 ------------------
   sandbox/assign_v2/libs/assign/v2/test/option.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/data.cpp | 62 +++++---
   sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp | 46 +++---
   sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp | 43 ++++--
   sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp | 41 +++--
   sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp | 25 ++-
   sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp | 71 ++++-----
   sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.h | 4
   sandbox/assign_v2/libs/assign/v2/test/put.cpp | 8 +
   sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp | 53 +++----
   sandbox/assign_v2/libs/assign/v2/test/put/put.cpp | 259 +++++--------------------------------
   sandbox/assign_v2/libs/assign/v2/test/ref/array.cpp | 30 ++--
   sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.cpp | 8
   sandbox/assign_v2/libs/assign/v2/test/ref/csv_array.cpp | 30 ++--
   sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp | 4
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/deque.cpp | 8
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/option.cpp | 4
   sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp | 10 +
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 126 +++++++++++++----
   77 files changed, 1900 insertions(+), 1706 deletions(-)

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -30,7 +30,7 @@
     template<typename C, typename R>
     C csv_put_copy(C& cont, R const& range)
     {
- csv_put( cont, as_arg_list( range ) );
+ put( cont ).for_each( range );
         return cont;
     }
 
@@ -43,18 +43,18 @@
     template<typename C, typename Arg, typename R>
     C dispatch(Arg const& arg, R const& range, convert_tag::put)
     {
- C cont( initializer<C>( arg ) );
+ C cont( initializer<C>( arg ) );
         return csv_put_copy( cont, range );
     }
 
     template<typename C, typename R>
- C dispatch(nil_, R const& range, convert_tag::put)
+ C dispatch(kwd_nil_, R const& range, convert_tag::put)
     {
         C cont; return csv_put_copy( cont, range );
     }
 
     template<typename C, typename R>
- C dispatch(nil_, R const& r, convert_tag::copy)
+ C dispatch(kwd_nil_, R const& r, convert_tag::copy)
     {
         return C( boost::begin( r ), boost::end( r ) );
     }
@@ -71,20 +71,20 @@
 
 //->
 
- template<typename C, typename Arg = nil_>
+ template<typename C, typename Arg = kwd_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, typename Arg>
     C operator|( R const& r, convert<C, Arg> const& adapter)/*<-*/
     {
@@ -93,27 +93,27 @@
 
 }// conversion_aux
 
- template<typename C, typename Arg = nil_>
+ template<typename C, typename Arg = kwd_nil_>
     struct convert/*<-*/
         : conversion_aux::convert<C, Arg>
     /*->*/
     {
-//<-
+//<-
         typedef conversion_aux::convert<C> super_t;
 //->
-
+
         convert()/*<-*/{}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
         convert(Arg const& arg)/*<-*/
             : super_t( arg )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
         template<typename Arg1>
         convert<C, Arg1>
         operator^(Arg1 const& arg1)/*<-*/
         {
             return convert<C, Arg1>( arg1 );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
     };
 
 //]

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -24,7 +24,7 @@
 //[syntax_conversion_converter
 namespace conversion_aux{
 
- template<typename R, typename Arg = nil_>
+ template<typename R, typename Arg = kwd_nil_>
     class converter
     {
 //<-
@@ -45,7 +45,7 @@
             typename call_traits<R>::param_type source,
             Arg const& arg
         )/*<-*/
- : arg_( arg ),
+ : arg_( arg ),
              source_( boost::make_iterator_range( source ) )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
@@ -73,7 +73,7 @@
 }// conversion_aux
 namespace result_of{
 
- template<typename R, typename Arg = nil_>
+ template<typename R, typename Arg = kwd_nil_>
     struct converter/*<-*/
     {
         typedef conversion_aux::converter<R, Arg> type;

Modified: sandbox/assign_v2/boost/assign/v2/deque/cpp03/csv_deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/deque/cpp03/csv_deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/deque/cpp03/csv_deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -10,115 +10,191 @@
 #ifndef BOOST_ASSIGN_V2_DEQUE_CPP03_CSV_DEQUE_ER_2011_HPP
 #define BOOST_ASSIGN_V2_DEQUE_CPP03_CSV_DEQUE_ER_2011_HPP
 #include <boost/assign/v2/support/config/limit_csv_arity.hpp>
-#include <boost/preprocessor/arithmetic/inc.hpp>
-#include <boost/preprocessor/control/expr_if.hpp>
-#include <boost/preprocessor/repetition.hpp>
-// This is to ensure that cpp03/csv_deque.hpp compiles as standalone (but it's
-// better to simply include the header below, instead)
-#include <boost/assign/v2/deque/csv_deque.hpp>
+#include <boost/assign/v2/support/pp/parameter_list.hpp>
+#include <boost/assign/v2/deque/csv_deque.hpp>
 
 namespace boost{
 namespace assign{
 namespace v2{
 namespace interpreter_aux{
 
-// Explicit T
-#define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
- template<typename T BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)>\
- typename boost::lazy_disable_if<\
- is_list_option<T0>,\
+#define BOOST_ASSIGN_V2_CSV_DEQUE_NESTED_ITER(z, N, SeqU)\
+ template<\
+ typename T, int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ >\
+ typename boost::lazy_enable_if_c<\
+ I == BOOST_PP_SEQ_SIZE(SeqU),\
         result_of::csv_deque<T>\
>::type\
- csv_deque(BOOST_PP_ENUM_BINARY_PARAMS(\
- N, T, BOOST_PP_EXPR_IF(is_const, const)& _\
- ))\
- {\
- typename result_of::csv_deque<T>::type result;\
- csv( result BOOST_PP_ENUM_TRAILING_PARAMS(N, _) );\
- return result;\
+ csv_deque\
+ (\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ return csv<I, BOOST_PP_SEQ_ENUM(SeqU)>(\
+ deque<T>( _nil )\
+ BOOST_PP_ENUM_TRAILING_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
+ );\
     }\
     template<\
- typename T, typename O\
- BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)\
+ typename T, typename Options,\
+ int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
>\
- typename boost::lazy_enable_if<\
- is_list_option<O>,\
- result_of::csv_deque_option<O, T>\
- >::type\
- csv_deque(\
- O const& options\
- BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(\
- N, T, BOOST_PP_EXPR_IF(is_const, const)& _\
- ))\
- {\
- typedef typename result_of::csv_deque<T>::type before_op_;\
- typedef typename result_of::csv_deque_option<O, T>::type result_;\
- result_ result = before_op_() % options;\
- csv( result BOOST_PP_ENUM_TRAILING_PARAMS(N, _) );\
- return result;\
+ typename boost::lazy_enable_if_c<\
+ I == BOOST_PP_SEQ_SIZE(SeqU),\
+ result_of::csv_deque_option<T, Options>\
+ >::type csv_deque\
+ (\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ return csv<I, BOOST_PP_SEQ_ENUM(SeqU)>(\
+ deque<T>( _nil ) % Options()\
+ BOOST_PP_ENUM_TRAILING_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
+ );\
     }\
 /**/
 
+#define BOOST_ASSIGN_V2_CSV_DEQUE_ITER(r, SeqU)\
+ BOOST_PP_REPEAT_FROM_TO(\
+ 1,\
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),\
+ BOOST_ASSIGN_V2_CSV_DEQUE_NESTED_ITER,\
+ SeqU\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_DEQUE_CONST_NON_CONST_OVERLOAD(z, I, data)\
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(\
+ BOOST_ASSIGN_V2_CSV_DEQUE_ITER,\
+ BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD(z, I, pos)\
+ BOOST_ASSIGN_V2_CSV_DEQUE_ITER(\
+ ~,\
+ BOOST_ASSIGN_V2_CSV_SEQ2(pos, I)\
+ )\
+/**/
+
 BOOST_PP_REPEAT_FROM_TO(
- 1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ 1, // TODO zero for empty case
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_ASSIGN_V2_CSV_DEQUE_CONST_NON_CONST_OVERLOAD,
+ ~
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD,
     0
 )
+
 BOOST_PP_REPEAT_FROM_TO(
- 1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD,
     1
 )
-#undef BOOST_ASSIGN_V2_MACRO
 
-// Implicit T
-#define BOOST_ASSIGN_V2_PAR_LIST(z, N, data) data
-#define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
- template<typename T>\
- typename boost::lazy_disable_if<\
- is_list_option<T>,\
- result_of::csv_deque<T>\
- >::type\
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_NESTED_ITER
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_ITER
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_CONST_NON_CONST_OVERLOAD
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD
+
+#define BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC(z, N, is_const)\
+ template<typename T, typename Options BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)>\
+ typename result_of::csv_deque_option<T, Options>::type\
     csv_deque(\
- BOOST_PP_ENUM_PARAMS(N, T BOOST_PP_EXPR_IF(is_const, const) & _)\
+ BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
     )\
     {\
- return csv_deque<T, BOOST_PP_ENUM( N, BOOST_ASSIGN_V2_PAR_LIST, T)>(\
- BOOST_PP_ENUM_PARAMS(N, _)\
+ return csv(\
+ deque<T, Options>( _nil )\
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, _)\
         );\
     }\
- template<typename O, typename T>\
- typename boost::lazy_enable_if<\
- is_list_option<O>,\
- result_of::csv_deque_option<O, T>\
- >::type\
+ template<typename T BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)>\
+ typename result_of::csv_deque<T>::type\
     csv_deque(\
- O const& options,\
- BOOST_PP_ENUM_PARAMS(N, T BOOST_PP_EXPR_IF(is_const, const) & _)\
+ BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
     )\
     {\
- return csv_deque<T, O, BOOST_PP_ENUM( N, BOOST_ASSIGN_V2_PAR_LIST, T )>(\
- options,\
- BOOST_PP_ENUM_PARAMS(N, _)\
- );\
+ return csv( deque<T>( _nil ) BOOST_PP_ENUM_TRAILING_PARAMS(N, _) );\
     }\
 /**/
+
+
 BOOST_PP_REPEAT_FROM_TO(
- 1,
+ 0, // case empty
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC,
     0
 )
 BOOST_PP_REPEAT_FROM_TO(
     1,
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC,
     1
 )
-#undef BOOST_ASSIGN_V2_PAR_LIST
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC
+
+#define BOOST_ASSIGN_V2_MACRO(z, i, data)\
+ T const& BOOST_PP_CAT(_,i)\
+/**/
+
+#define BOOST_ASSIGN_V2_REST_PARAMS(N)\
+ BOOST_PP_COMMA_IF(BOOST_PP_DEC(N))\
+ BOOST_PP_ENUM_SHIFTED(\
+ N,\
+ BOOST_ASSIGN_V2_MACRO,\
+ ~\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC_IMPLICIT(z, N, is_const)\
+ template<typename T, typename Options>\
+ typename result_of::csv_deque_option<T, Options>::type\
+ csv_deque(\
+ T const& _0\
+ BOOST_ASSIGN_V2_REST_PARAMS(N)\
+ )\
+ {\
+ typedef typename csv_deque_deduce_value<T>::type t_;\
+ return csv(\
+ deque<t_, Options>( _nil ), \
+ BOOST_PP_ENUM_PARAMS(N, _)\
+ );\
+ }\
+ template<typename T>\
+ typename result_of::csv_deque<T>::type\
+ csv_deque(\
+ T const& _0\
+ BOOST_ASSIGN_V2_REST_PARAMS(N)\
+ )\
+ {\
+ typedef typename csv_deque_deduce_value<T>::type t_;\
+ return csv( deque<t_>( _nil ), BOOST_PP_ENUM_PARAMS(N, _) );\
+ }\
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
+ BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC_IMPLICIT,
+ ~
+)
+
 #undef BOOST_ASSIGN_V2_MACRO
+#undef BOOST_ASSIGN_V2_CSV_DEQUE_OVERLOAD_VARIADIC
 
 }// interpreter_aux
 using interpreter_aux::csv_deque;

Modified: sandbox/assign_v2/boost/assign/v2/deque/cpp03/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/deque/cpp03/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/deque/cpp03/deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,8 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_DEQUE_CPP03_DEQUE_ER_2011_HPP
 #define BOOST_ASSIGN_V2_DEQUE_CPP03_DEQUE_ER_2011_HPP
-#include <boost/assign/v2/support/config/limit_arity.hpp>
-#include <boost/assign/v2/support/config/limit_lvalue_const_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_const_non_const_arity.hpp>
 #include <boost/assign/v2/support/keyword.hpp>
 #include <boost/assign/v2/support/pp/parameter_list.hpp>
 #include <boost/assign/v2/deque/fwd.hpp>
@@ -18,9 +18,7 @@
 #include <boost/preprocessor/repetition.hpp>
 #include <boost/preprocessor/seq.hpp>
 #include <boost/type_traits/remove_cv.hpp>
-// This is to ensure that cpp03/deque.hpp compiles as standalone (but it's
-// better to simply include the header below, instead)
-#include <boost/assign/v2/deque/deque.hpp>
+#include <boost/assign/v2/deque/deque.hpp>
 
 namespace boost{
 namespace assign{
@@ -34,14 +32,21 @@
         return deque<T>( v2::_nil )();
     }
 
+ template<typename T, typename Options>
+ typename result_of::deque_option<T, Options>::type
+ deque()
+ {
+ return deque<T, Options>( v2::_nil )();
+ }
+
 // Overloads for any mixture of const/non-const arguments
 
 #define BOOST_ASSIGN_V2_MACRO1(r, SeqU)\
     template<typename T, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)>\
     typename result_of::deque<T>::type\
- deque( BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, _) ){\
+ deque( BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, 0) ){\
         return deque<T>( v2::_nil )(\
- BOOST_ASSIGN_V2_ARG_LIST(SeqU, _)\
+ BOOST_ASSIGN_V2_ARG_LIST(SeqU, 0)\
         );\
     }\
 /**/
@@ -51,7 +56,7 @@
 )\
 /**/
 BOOST_PP_REPEAT(
- BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY,
+ BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY,
     BOOST_ASSIGN_V2_MACRO2,
     ~
 )
@@ -76,8 +81,8 @@
 \
 /**/
 BOOST_PP_REPEAT_FROM_TO(
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY),
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
     BOOST_ASSIGN_V2_MACRO,
     ~
 )

Modified: sandbox/assign_v2/boost/assign/v2/deque/csv_deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/deque/csv_deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/deque/csv_deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -17,7 +17,6 @@
 #include <boost/type_traits/decay.hpp>
 #include <boost/type_traits/remove_cv.hpp>
 #include <boost/type_traits/remove_reference.hpp>
-#include <boost/utility/enable_if.hpp>
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <utility>
 #endif
@@ -44,7 +43,7 @@
>
     {};
 
- template<typename O, typename T>
+ template<typename T, typename O>
     struct csv_deque_option/*<-*/
         : modulo_result<
             typename result_of::csv_deque<T>::type,
@@ -54,41 +53,60 @@
 
 }// result_of
 
- // Empty
- template<typename T>
- typename result_of::csv_deque<T>::type
- csv_deque()/*<-*/{
- return typename result_of::csv_deque<T>::type();
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
 //<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
+
+ // Explicit value
     template<typename T, typename... Args>
- typename /*<-*/boost::lazy_disable_if<
- is_list_option_cpp0x<T>,
- /*->*/result_of::csv_deque<T>/*<-*/
- >/*->*/::type
- csv_deque(T&& t, Args&& ... args)/*<-*/
+ typename result_of::csv_deque<T>::type
+ csv_deque(Args&& ... args)/*<-*/
+ {
+ typename result_of::csv_deque<T>::type result;
+ return csv(
+ result,
+ std::forward<Args>( args )...
+ );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<typename T, typename Options, typename... Args>
+ typename result_of::csv_deque_option<T, Options>::type
+ csv_deque(Args&& ... args)/*<-*/
+ {
+ typename result_of::csv_deque_option<T, Options>::type result;
+ return csv( result, std::forward<Args>( args )... );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ // Deduced value
+ template<typename T, typename... Args>
+ typename result_of::csv_deque<T>::type
+ csv_deque(T&& _0, Args&& ... args)/*<-*/
+ {
+ typename result_of::csv_deque<T>::type result;
+ return csv(
+ result,
+ std::forward<T>( _0 ),
+ std::forward<Args>( args )...
+ );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ // Arity = I
+
+ template<typename T, int I, typename...Types, typename... Args>
+ typename result_of::csv_deque<T>::type
+ csv_deque(Args&& ... args)/*<-*/
     {
         typename result_of::csv_deque<T>::type result;
- csv( result, std::forward<T>( t ), std::forward<Args>( args )... );
- return result;
+ return csv<I, Types...>( result, std::forward<Args>( args )...);
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename T, typename O, typename... Args>
- typename /*<-*/boost::lazy_enable_if<
- is_list_option<O>,
- /*->*/result_of::csv_deque_option<O, T>/*<-*/
- >/*->*/::type
- csv_deque(O const& options, T&& t, Args&& ... args)/*<-*/
+ template<typename T,
+ typename Options, int I, typename...Types, typename... Args>
+ typename result_of::csv_deque_option<T, Options>::type
+ csv_deque(Args&& ... args)/*<-*/
     {
- typedef typename result_of::csv_deque<T>::type before_op_;
- typename result_of::csv_deque_option<
- O, T
- >::type result = before_op_() % options;
- csv( result, std::forward<T>( t ), std::forward<Args>( args )... );
- return result;
+ typename result_of::csv_deque_option<T, Options>::type result;
+ return csv<I, Types...>( result, std::forward<Args>( args )... );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
 //<-
@@ -107,7 +125,6 @@
 namespace result_of{
 
     using interpreter_aux::result_of::csv_deque;
- using interpreter_aux::result_of::csv_deque_option;
 
 }// result_of
 

Modified: sandbox/assign_v2/boost/assign/v2/deque/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/deque/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/deque/deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -15,6 +15,7 @@
 #include <boost/assign/v2/interpreter/modifier.hpp>
 #include <boost/assign/v2/interpreter/replace.hpp>
 #include <boost/assign/v2/deque/fwd.hpp>
+#include <boost/assign/v2/option/list.hpp>
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 #include <boost/assign/v2/support/keyword.hpp>
 #include <boost/assign/v2/support/pp/ignore.hpp>
@@ -35,12 +36,12 @@
 namespace interpreter_aux{
 
     template<typename T>
- struct deque_impl{
- typedef std::deque<T> type;
+ struct deque_impl{
+ typedef std::deque<T> type;
     };
 
     template<typename T, typename F, typename MTag>
- class deque_interpreter
+ class deque_interpreter
         : public interpreter_crtp<
             deque_interpreter<T, F, MTag>,
             typename deque_impl<T>::type, F, MTag, data_tag::value
@@ -59,11 +60,11 @@
         public:
 
         typedef T value_type;
- typedef /*<-*/typename boost::range_size<impl_>::type
+ typedef /*<-*/typename boost::range_size<impl_>::type
         BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/size_type;
- typedef /*<-*/typename boost::range_iterator<impl_>::type
+ typedef /*<-*/typename boost::range_iterator<impl_>::type
         BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/iterator;
- typedef /*<-*/typename boost::range_iterator<cimpl_>::type
+ typedef /*<-*/typename boost::range_iterator<cimpl_>::type
         BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/const_iterator;
         typedef /*<-*/typename impl_::reference
         BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified /*<-*/)/*->*/reference;
@@ -75,8 +76,8 @@
         // Constructor
         deque_interpreter()/*<-*/
             {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- deque_interpreter(
- impl_ const& cont, F const& f, modifier_ const& m
+ deque_interpreter(
+ impl_ const& cont, F const& f, modifier_ const& m
         )/*<-*/
             : put_crtp_( f, m ), impl( cont )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
@@ -88,7 +89,7 @@
 //->
         // Move constructor
         deque_interpreter(deque_interpreter&& d)
- : put_crtp_( std::move<put_crtp_&>(d) ),
+ : put_crtp_( std::move<put_crtp_&>(d) ),
             impl( std::move(d.impl) )
         {}
         // Move assignment
@@ -100,7 +101,6 @@
 //<-
         #endif
 //->
-
         // Deque interface
         iterator begin()/*<-*/{
             return boost::begin( this->impl );
@@ -152,8 +152,8 @@
             this->container().swap( that.container() );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- impl_& container()const/*<-*/{
- return this->impl;
+ impl_& container()const/*<-*/{
+ return this->impl;
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 //<-
         protected:
@@ -165,9 +165,9 @@
     struct replace_data_generator< deque_interpreter<T, F, MTag> >
     {
         template<typename F1>
- struct apply{
+ struct apply{
             typedef /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)
- deque_interpreter<T, F1, MTag>/*->*/ type;
+ deque_interpreter<T, F1, MTag>/*->*/ type;
         };
     };
 
@@ -175,9 +175,9 @@
     struct replace_modifier_tag< deque_interpreter<T, F, MTag> >
     {
         template<typename MTag1>
- struct apply{
- /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)typedef
- deque_interpreter<T, F, MTag1>/*->*/ type;
+ struct apply{
+ /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)typedef
+ deque_interpreter<T, F, MTag1>/*->*/ type;
         };
     };
 
@@ -193,16 +193,32 @@
         typedef deque_interpreter<t_, f_, modifier_tag_> type;
     };
 
+ template<typename T, typename O>
+ struct deque_option
+ /*<-*/
+ {
+ typedef typename result_of::deque<T>::type deque_;
+ typedef typename modulo_result<deque_, O>::type type;
+ }/*->*/;
+
 }// result_of
 
     // Empty
     template<typename T>
     typename result_of::deque<T>::type
- deque( nil_ )/*<-*/
+ deque( kwd_nil_ )/*<-*/
     {
         return typename result_of::deque<T>::type();
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
+ template<typename T, typename Options>
+ typename result_of::deque_option<T, Options>::type
+ deque( kwd_nil_ )/*<-*/
+ {
+ return deque<T>( _nil ) % Options();
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+
 //<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
@@ -217,6 +233,18 @@
         ));
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+ // Default constructible options
+
+ template<typename T, typename Options, typename...Args>
+ typename result_of::deque<T>::type
+ deque(Args&&...args)/*<-*/
+ {
+ // TODO move?
+ return deque<T, Options>( v2::_nil )(
+ std::forward<Args>(args)...
+ );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
 //<-
 #endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->

Modified: sandbox/assign_v2/boost/assign/v2/include.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/include.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/include.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -12,6 +12,7 @@
 #include <boost/assign/v2/include/chain.hpp>
 #include <boost/assign/v2/include/convert.hpp>
 #include <boost/assign/v2/include/converter.hpp>
+#include <boost/assign/v2/include/csv.hpp>
 #include <boost/assign/v2/include/csv_deque.hpp>
 #include <boost/assign/v2/include/csv_put.hpp>
 #include <boost/assign/v2/include/deque.hpp>

Modified: sandbox/assign_v2/boost/assign/v2/include/csv_deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/include/csv_deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/include/csv_deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,6 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INCLUDE_CSV_DEQUE_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INCLUDE_CSV_DEQUE_ER_2011_HPP
+#include <boost/assign/v2/deque/conversion.hpp>
 #include <boost/assign/v2/deque/csv_deque.hpp>
 
 #endif // BOOST_ASSIGN_V2_INCLUDE_CSV_DEQUE_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/include/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/include/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/include/deque.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,6 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INCLUDE_DEQUE_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INCLUDE_DEQUE_ER_2011_HPP
+#include <boost/assign/v2/deque/conversion.hpp>
 #include <boost/assign/v2/deque/deque.hpp>
 
 #endif // BOOST_ASSIGN_V2_INCLUDE_DEQUE_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/include/ref/array.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/include/ref/array.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/include/ref/array.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,6 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INCLUDE_REF_ARRAY_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INCLUDE_REF_ARRAY_ER_2011_HPP
+#include <boost/assign/v2/ref/array/conversion.hpp>
 #include <boost/assign/v2/ref/array/array.hpp>
 
 #endif // BOOST_ASSIGN_V2_INCLUDE_REF_ARRAY_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/include/ref/csv_array.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/include/ref/csv_array.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/include/ref/csv_array.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,6 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INCLUDE_REF_CSV_ARRAY_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INCLUDE_REF_CSV_ARRAY_ER_2011_HPP
+#include <boost/assign/v2/ref/array/conversion.hpp>
 #include <boost/assign/v2/ref/array/csv_array.hpp>
 
 #endif // BOOST_ASSIGN_V2_INCLUDE_REF_CSV_ARRAY_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/interpreter.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,7 +9,6 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INTERPRETER_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INTERPRETER_ER_2011_HPP
-#include <boost/assign/v2/interpreter/as_arg_list.hpp>
 #include <boost/assign/v2/interpreter/csv.hpp>
 #include <boost/assign/v2/interpreter/data.hpp>
 #include <boost/assign/v2/interpreter/crtp.hpp>

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/as_arg_list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/as_arg_list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/as_arg_list.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,97 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2011 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 BOOST_ASSIGN_V2_INTERPRETER_AS_ARG_LIST_ER_2011_HPP
-#define BOOST_ASSIGN_V2_INTERPRETER_AS_ARG_LIST_ER_2011_HPP
-#include <boost/assign/v2/support/pp/ignore.hpp>
-#include <boost/range/iterator.hpp>
-#include <boost/range/iterator_range.hpp>
-#include <boost/mpl/bool.hpp>
-
-namespace boost{
-namespace assign{
-namespace v2{
-//[syntax_interpreter_as_arg_list
-namespace interpreter_aux{
-
- template<
- typename R // Range
- >
- struct as_arg_list_adapter
- : boost::iterator_range<
- typename boost::range_iterator<R>::type
- >/*<-*/
- {
-
- typedef boost::iterator_range<
- typename boost::range_iterator<R>::type
- > super_t;
-
- public:
-
- as_arg_list_adapter(R& range)
- :super_t(
- boost::make_iterator_range( range )
- )
- {}
-
- private:
- as_arg_list_adapter();
- }/*->*/;
-
- template<typename T>
- struct is_as_arg_list_adapter
- : ::boost::mpl::false_
- {};
-
- template<typename R>
- struct is_as_arg_list_adapter<
- as_arg_list_adapter<R>
- >
- : ::boost::mpl::true_
- {};
-
-namespace result_of{
-
- template<typename R>
- struct as_arg_list/*<-*/
- {
- typedef as_arg_list_adapter<R> type;
- }/*->*/;
-
-}// result_of
-
- template<typename R>
- typename result_of::as_arg_list<R>::type
- as_arg_list(R& range)/*<-*/
- {
- return typename result_of::as_arg_list<R>::type( range );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
- template<typename R>
- typename result_of::as_arg_list<R const>::type
- as_arg_list(R const& range)/*<-*/
- {
- return typename result_of::as_arg_list<R const>::type( range );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
-}// interpreter_aux
-
- using interpreter_aux::as_arg_list;
-
-namespace result_of{
- using interpreter_aux::result_of::as_arg_list;
-}// result_of
-
-//]
-}// v2
-}// assign
-}// boost
-
-#endif // BOOST_ASSIGN_V2_INTERPRETER_AS_ARG_LIST_ER_2011_HPP
+// TODO remove file

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/cpp03/csv.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/cpp03/csv.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/cpp03/csv.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,68 +9,108 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INTERPRETER_CPP03_CSV_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INTERPRETER_CPP03_CSV_ER_2011_HPP
-#include <boost/preprocessor/arithmetic.hpp>
-#include <boost/preprocessor/control.hpp>
-#include <boost/preprocessor/repetition.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
+#include <boost/assign/v2/support/config/limit_csv_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_const_non_const_arity.hpp>
+#include <boost/assign/v2/support/pp/parameter_list.hpp>
+#include <boost/preprocessor.hpp> // TODO remove
+#include <boost/utility/enable_if.hpp>
+
 // This is to ensure that cpp03/csv.hpp compiles as standalone (but it's
 // better, instead, to simply include the header below)
 #include <boost/assign/v2/interpreter/csv.hpp>
 
-namespace boost{
-namespace assign{
-namespace v2{
-namespace interpreter_aux{
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_EXIT(z, J, data)\
+ template<\
+ int I, BOOST_PP_ENUM_PARAMS(J, typename T)\
+ , typename D, typename C, typename F, typename MTag, typename DTag\
+ >\
+ typename boost::enable_if_c<\
+ I == J,\
+ D const&\
+ >::type\
+ csv\
+ (\
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter\
+ )\
+ {\
+ return static_cast<D const&>( interpreter );\
+ }\
+/**/
 
- template<typename D, typename C, typename F, typename MTag, typename DTag>
- void csv(
- interpreter_crtp<D, C, F, MTag, DTag> const& interpreter
- )/*<-*/
- {
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_NESTED_ITER(z, N, SeqU)\
+ template<\
+ int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ , typename D, typename C, typename F, typename MTag, typename DTag\
+ >\
+ typename boost::enable_if_c<\
+ I == BOOST_PP_SEQ_SIZE(SeqU),\
+ D const&\
+ >::type\
+ csv\
+ (\
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ interpreter(\
+ BOOST_ASSIGN_V2_ARG_LIST(SeqU, 0)\
+ );\
+ return csv<I, BOOST_PP_SEQ_ENUM(SeqU)>(\
+ static_cast<D const&>( interpreter )\
+ BOOST_PP_ENUM_TRAILING(\
+ BOOST_PP_MUL( BOOST_PP_DEC(N), BOOST_PP_SEQ_SIZE(SeqU) ),\
+ BOOST_ASSIGN_V2_CSV_ARG_LIST_ITER,\
+ BOOST_PP_SEQ_SIZE(SeqU)\
+ )\
+ );\
+ }\
+/**/
 
- template<
- typename D, typename C, typename F, typename MTag, typename DTag,
- typename R
- >
- void invoke(
- interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
- as_arg_list_adapter<R> const & adapter
- )/*<-*/
- {
- interpreter.as_arg_list( adapter );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_ITER(r, SeqU)\
+ BOOST_PP_REPEAT_FROM_TO(\
+ 1,\
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),\
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_NESTED_ITER,\
+ SeqU\
+ )\
+/**/
 
- template<
- typename D, typename C, typename F, typename MTag, typename DTag,
- typename T
- >
- typename boost::disable_if<
- is_as_arg_list_adapter<
- typename boost::remove_cv<T>::type
- >
- >::type
- invoke(
- interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
- T& t
- )/*<-*/
- {
- interpreter( t );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+// CONST_NON_CONST_OVERLOAD
+
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_CONST_NON_CONST_OVERLOAD(z, I, data)\
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(\
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_ITER,\
+ BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ )\
+/**/
+
+// OVERLOAD
 
-#define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD(z, I, pos)\
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_ITER(\
+ ~,\
+ BOOST_ASSIGN_V2_CSV_SEQ2(pos, I)\
+ )\
+/**/
+
+// OVERLOAD_VARIADIC
+
+#define BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD_VARIADIC(z, N, is_const)\
     template<\
- typename D, typename C, typename F, typename MTag, typename DTag,\
         BOOST_PP_ENUM_PARAMS(N, typename T)\
+ BOOST_PP_COMMA_IF(N)\
+ typename D, typename C, typename F, typename MTag, typename DTag\
>\
- void csv(\
+ D const& csv(\
         interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,\
         BOOST_PP_ENUM_BINARY_PARAMS(\
             N, T, BOOST_PP_EXPR_IF(is_const, const) & _\
         )\
     )\
     {\
- invoke( interpreter, _0 );\
- csv(\
+ interpreter( _0 );\
+ return csv(\
             interpreter\
             BOOST_PP_COMMA_IF( BOOST_PP_DEC(N) )\
             BOOST_PP_ENUM_SHIFTED_PARAMS(N, _ )\
@@ -78,21 +118,71 @@
     }\
 /**/
 
+namespace boost{
+namespace assign{
+namespace v2{
+namespace interpreter_aux{
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_EXIT,
+ ~
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_CONST_NON_CONST_OVERLOAD,
+ ~
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD,
+ 0
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD,
+ 1
+)
+
+ template<typename D, typename C, typename F, typename MTag, typename DTag>
+ D const& csv(
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter
+ )
+ {
+ return static_cast<D const&>( interpreter );
+ }
+
 BOOST_PP_REPEAT_FROM_TO(
     1,
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD_VARIADIC,
     0
 )
 BOOST_PP_REPEAT_FROM_TO(
     1,
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD_VARIADIC,
     1
 )
-#undef BOOST_ASSIGN_V2_MACRO
+
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_EXIT
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_NESTED_ITER
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_ITER
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_CONST_NON_CONST_OVERLOAD
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD
+#undef BOOST_ASSIGN_V2_INTERPRETER_CSV_OVERLOAD_VARIADIC
 
 }// interpreter_aux
+
+using interpreter_aux::csv;
+
 }// v2
 }// assign
 }// boost

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/crtp.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/crtp.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/crtp.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,13 +9,13 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_INTERPRETER_CRTP_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INTERPRETER_CRTP_ER_2011_HPP
+#include <boost/assign/v2/interpreter/fwd.hpp>
+#include <boost/assign/v2/interpreter/modifier.hpp>
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 #include <boost/assign/v2/support/pp/forward.hpp>
 #include <boost/assign/v2/support/pp/ignore.hpp>
 #include <boost/assign/v2/support/traits/container.hpp>
-#include <boost/assign/v2/interpreter/as_arg_list.hpp>
-#include <boost/assign/v2/interpreter/fwd.hpp>
-#include <boost/assign/v2/interpreter/modifier.hpp>
+#include <boost/assign/v2/support/traits/type/param.hpp>
 #include <boost/concept_check.hpp>
 #include <boost/function.hpp>
 #include <boost/mpl/always.hpp>
@@ -23,19 +23,22 @@
 #include <boost/range/algorithm/for_each.hpp>
 #include <boost/range/reference.hpp>
 #include <boost/ref.hpp>
-#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/add_const.hpp>
 #include <boost/type_traits/remove_reference.hpp>
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <boost/assign/v2/support/mpl/variadic_args_to_indices.hpp>
 #include <utility>
 #else
-#include <boost/assign/v2/support/config/limit_arity.hpp>
-#include <boost/assign/v2/support/config/limit_csv_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
 #include <boost/assign/v2/support/functor/crtp_unary_and_up.hpp>
+#include <boost/mpl/int.hpp>
 #include <boost/preprocessor/arithmetic.hpp>
 #include <boost/preprocessor/cat.hpp>
 #include <boost/preprocessor/repetition.hpp>
 #endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
 
+#include <boost/tuple/tuple.hpp> // Needed by for_each...
+
 namespace boost{
 namespace assign{
 namespace v2{
@@ -134,12 +137,12 @@
 
         public:
 
- typedef /*<-*/ typename modifier_holder_::modifier_type
+ typedef /*<-*/ typename modifier_holder_::modifier_type
             BOOST_ASSIGN_V2_IGNORE(/*->*/ interpreter_modifier<Tag> /*<-*/)/*->*/
         modifier_type;
 
         interpreter_crtp(){}
- explicit interpreter_crtp( F const& f )/*<-*/
+ explicit interpreter_crtp( F const& f )/*<-*/
             : data_gen_holder_( f )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
         interpreter_crtp( F const& f, modifier_type const& m )/*<-*/
@@ -147,7 +150,6 @@
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
         typedef D const& result_type;
-
 //<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
@@ -161,11 +163,17 @@
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
         template<typename R>
- result_type as_arg_list( R&& range )const/*<-*/
+ result_type for_each( R&& range )const/*<-*/
+ {
+ return this->for_each_impl( std::forward<R>( range ) );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<int I, typename R>
+ result_type for_each( R&& range )const/*<-*/
         {
- return this->as_arg_list_impl( std::forward<R>( range ) );
+ return this->for_each_impl<I>( std::forward<R>( range ) );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
 //<-
 #else
         protected:
@@ -184,18 +192,33 @@
 
         template<typename R>
         result_type
- as_arg_list( R& range )const/*<-*/
+ for_each( R& range )const/*<-*/
         {
- return this->as_arg_list_impl( range );
+ return this->for_each_impl( range );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
         template<typename R>
         result_type
- as_arg_list( R const& range )const/*<-*/
+ for_each( R const& range )const/*<-*/
+ {
+ return this->for_each_impl( range );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<int I, typename R>
+ result_type
+ for_each( R& range )const/*<-*/
         {
- return this->as_arg_list_impl( range );
+ return this->for_each_impl<I>( range );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+ template<int I, typename R>
+ result_type
+ for_each( R const& range )const/*<-*/
+ {
+ return this->for_each_impl<I>( range );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+
 #define BOOST_ASSIGN_V2_MACRO(z, N, data) \
     template<BOOST_PP_ENUM_PARAMS(N, typename T)> \
     result_type \
@@ -206,7 +229,7 @@
 /**/
 BOOST_PP_REPEAT_FROM_TO(
     1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
     BOOST_ASSIGN_V2_MACRO,
     ~
 )
@@ -238,7 +261,7 @@
         result_type modify(T&& t)const
         {
             check_modifier<T>();
-
+
             this->modifier.impl(
                 this->derived().container(),
                 std::forward<T>( t ),
@@ -246,6 +269,53 @@
             );
             return this->derived();
         }
+
+ // for_each
+
+ template<typename Indices>
+ struct unpacker
+ {
+
+ unpacker(D const& d)
+ : derived( d )
+ {}
+
+ template<typename T>
+ void operator()(T const& tuple)const
+ {
+ this->impl(
+ tuple,
+ Indices()
+ );
+ }
+
+ private:
+
+ template<typename T, int...Values>
+ void impl(
+ T const& tuple,
+ indices<int, Values...>
+ )const
+ {
+ this->derived(
+ get<Values>( tuple )...
+ );
+ }
+ D const& derived;
+ };
+
+ template<int I, typename R>
+ result_type
+ for_each_impl( BOOST_ASSIGN_V2_FORWARD_PARAM(R, range) )const
+ {
+ typedef typename head_indices<int, I>::type indices_;
+ boost::for_each(
+ BOOST_ASSIGN_V2_FORWARD_ARG(R, range),
+ unpacker<indices_>( static_cast<D const&>(*this ) )
+ );
+ return this->derived();
+ }
+
 #else
         template<typename T>
         result_type modify(T& t)const
@@ -263,19 +333,73 @@
             return this->derived();
         }
 
+ template<int I>
+ struct unpacker
+ {
+
+ unpacker(D const& d)
+ : derived( d )
+ {}
+
+ template<typename T>
+ void operator()(T const& tuple)const
+ {
+ typedef ::boost::mpl::int_<I> int_;
+ this->impl( int_(), tuple );
+ }
+
+ private:
+
+#define BOOST_ASSIGN_V2_get(z, i, data)\
+ get<i>( tuple )\
+/**/
+#define BOOST_ASSIGN_V2_MACRO(z, N, data)\
+ template<typename T>\
+ void impl(::boost::mpl::int_<N>, T const& tuple)const\
+ {\
+ this->derived(\
+ BOOST_PP_ENUM(N, BOOST_ASSIGN_V2_get, ~)\
+ );\
+ }\
+/**/
+BOOST_PP_REPEAT(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_MACRO,
+ ~
+)
+#undef BOOST_ASSIGN_V2_GET
+#undef BOOST_ASSIGN_V2_MACRO
+
+ D const& derived;
+
+ };
+
+ template<int I, typename R>
+ result_type
+ for_each_impl( BOOST_ASSIGN_V2_FORWARD_PARAM(R, range) )const
+ {
+ boost::for_each(
+ BOOST_ASSIGN_V2_FORWARD_ARG(R, range),
+ unpacker<I>( static_cast<D const&>(*this ) )
+ );
+ return this->derived();
+ }
+
 #endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
 
         template<typename R>
         result_type
- as_arg_list_impl( BOOST_ASSIGN_V2_FORWARD_PARAM(R, range) )const/*<-*/
+ for_each_impl( BOOST_ASSIGN_V2_FORWARD_PARAM(R, range) )const
         {
             typedef typename boost::range_reference<
- typename boost::remove_reference<R>::type
+ typename boost::remove_reference<
+ typename type_traits::param<R>::type
+ >::type
>::type t_;
             boost::function<result_type ( t_ )> f = boost::cref( *this );
             boost::for_each( BOOST_ASSIGN_V2_FORWARD_ARG(R, range), f );
             return this->derived();
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ }
 
 //->
     };

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -10,14 +10,15 @@
 #ifndef BOOST_ASSIGN_V2_INTERPRETER_CSV_ER_2011_HPP
 #define BOOST_ASSIGN_V2_INTERPRETER_CSV_ER_2011_HPP
 #include <boost/assign/v2/interpreter/crtp.hpp>
-#include <boost/assign/v2/interpreter/as_arg_list.hpp>
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 #include <boost/assign/v2/support/pp/ignore.hpp>
+#include <boost/assign/v2/support/traits/type/add_ref_const.hpp>
 #include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits.hpp>
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <boost/assign/v2/support/mpl/variadic_args_to_indices.hpp>
 #include <utility>
+#include <tuple>
 
 namespace boost{
 namespace assign{
@@ -25,61 +26,257 @@
 //[syntax_interpreter_csv
 namespace interpreter_aux{
 
- template<typename D, typename C, typename F, typename MTag, typename DTag>
- void csv(
+ template<
+ int I,
+ typename... Types,
+ typename D, typename C, typename F, typename MTag, typename DTag,
+ typename... Args
+ >
+ D const&
+ csv(
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
+ Args&&... args
+ );
+
+//<-
+ template<int I, int K, typename...Types>
+ struct csv_tail
+ {
+ template<typename D, typename T, typename ...Args>
+ static D const& call( D const& interpreter, T&& /*drop*/, Args&&...args )
+ {
+ typedef csv_tail<I, K + 1, Types...> next_;
+ return next_::call(
+ interpreter,
+ std::forward<Args>( args )...
+ );
+ }
+ };
+
+ template<int I, typename...Types>
+ struct csv_tail<I, I, Types...>
+ {
+ template<typename D, typename ...Args>
+ static D const& call( D const& interpreter, Args&&...args)
+ {
+ return csv<I, Types...>(
+ interpreter, std::forward<Args>( args )...
+ );
+ }
+ };
+
+ template<
+ int I, typename Head, typename Tail,
+ bool exit = ( pack_holder_size<int, Head>::value == I )
+ > struct csv_cast{};
+
+ template<int I, typename...Head, typename U, typename...Tail>
+ struct csv_cast<
+ I,
+ pack_holder<Head...>,
+ pack_holder<U, Tail...>,
+ false
+ > : csv_cast<
+ I,
+ pack_holder<Head..., U>,
+ pack_holder<Tail...>
+ >
+ {};
+
+ template<int I, typename... Head, typename... Tail>
+ struct csv_cast<I, pack_holder<Head...>, pack_holder<Tail...>, true >
+ {
+ typedef pack_holder<Head...> type;
+ };
+
+ template<typename NextTuple, int ...Values, typename Tuple, typename T>
+ NextTuple
+ csv_next_tuple(// TODO weird warning : unused parameter 'tu'
+ indices<int, Values...>,
+ Tuple&& tu,
+ T&& t
+ )
+ {
+ return NextTuple(
+ get<Values>( std::forward<Tuple>( tu ) )...,
+ std::forward<T>( t )
+ );
+ }
+
+ template<typename T> struct csv_tuple_elem{};
+ template<typename T> struct csv_tuple_elem<T&>{ typedef T& type; };
+ template<typename T> struct csv_tuple_elem<T&&>{
+ // TODO
+ // This ought to be T&& as long as temporary is used before the
+ // semi-colon ending statement.
+ typedef T type;
+ };
+
+ template<typename ...Args>
+ struct csv_tuple
+ {
+ typedef std::tuple<
+ typename csv_tuple_elem<Args>::type...
+ > type;
+ };
+
+ template<int I, typename HeadPack, typename ArgsPack,
+ bool exit = pack_holder_size<int, HeadPack>::value == I
+ >
+ struct csv_tuple_head{};
+
+ template<int I, typename ...Head, typename...Args>
+ struct csv_tuple_head<
+ I, pack_holder<Head...>, pack_holder<Args...>, true
+ >
+ {
+ typedef typename csv_tuple<Head&&...>::type type;
+
+ static type call(type&& tu, Args&&... /*unused*/)
+ {
+ return tu;
+ }
+ };
+
+ template<int I, typename ...Head, typename T, typename...Args>
+ struct csv_tuple_head<
+ I,
+ pack_holder<Head...>,
+ pack_holder<T, Args...>,
+ false
+ >
+ {
+ typedef typename csv_tuple<Head&&...>::type tuple_;
+ typedef csv_tuple_head<
+ I,
+ pack_holder<Head..., T>,
+ pack_holder<Args...>
+ > next_;
+ typedef typename next_::type type;
+
+ static type call(tuple_&& tu, T&& t, Args&&... args)
+ {
+ typedef typename head_indices<
+ int, sizeof...(Head)
+ >::type indices_;
+ typedef typename csv_tuple<Head&&..., T&&>::type next_tuple_;
+ return next_::call(
+ csv_next_tuple< next_tuple_ >(
+ indices_(),
+ std::forward<tuple_>( tu ),
+ std::forward<T>( t )
+ ),
+ std::forward<Args>( args )...
+ );
+ }
+
+ };
+
+/*
+ template<typename D, typename...Cast>
+ void csv_invoke_helper(D const& interpreter, Cast&&...args)
+ {
+ interpreter( std::forward<Cast>( args )...);
+ }
+*/
+
+ template<typename D, typename...Cast>
+ void csv_invoke_helper(D const& interpreter, Cast...args)
+ {
+ interpreter( args...);
+ }
+
+ template<typename D, int...Values, typename...Cast, typename Tuple>
+ void csv_invoke(
+ D const& interpreter,
+ indices<int, Values...>,
+ pack_holder<Cast...>,
+ Tuple&& tu
+ )
+ {
+ csv_invoke_helper<D, Cast...>(
+ interpreter,
+ get<Values>( std::forward<Tuple>( tu ) )...
+ );
+ }
+
+ template<
+ int I,
+ typename... Types,
+ typename D, typename C, typename F, typename MTag, typename DTag
+ >
+ D const&
+ csv(
         interpreter_crtp<D, C, F, MTag, DTag> const& interpreter
- )/*<-*/
+ )
     {
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ return static_cast<D const&>( interpreter );
+ }
 
     template<
+ int I,
+ typename... Types,
         typename D, typename C, typename F, typename MTag, typename DTag,
- typename R
+ typename... Args
>
- void invoke(
+ D const&
+ csv(
         interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
- const as_arg_list_adapter<R>& adapter
- )/*<-*/
+ Args&&... args
+ )
     {
- interpreter.as_arg_list( adapter );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+ {
+ typedef pack_holder<
+ typename type_traits::add_ref_const<Types>::type...
+ > head_;
+ typedef pack_holder<Args...> tail_;
+ typedef typename csv_cast<I, head_, tail_>::type cast_;
+
+ typedef csv_tuple_head<
+ I, pack_holder<>, pack_holder<Args...>
+ > make_tuple_;
+
+ typedef typename head_indices<int, I>::type indices_;
+ typedef std::tuple<> init_;
+ csv_invoke(
+ interpreter,
+ indices_(),
+ cast_(),
+ make_tuple_::call
+ (
+ init_(),
+ std::forward<Args>( args )...
+ )
+ );
+ }
+ {
+ typedef csv_tail<I, 0, Types...> tail_;
+ return tail_::call(
+ static_cast<D const&>( interpreter ),
+ std::forward<Args>( args )...
+ );
+ }
+ }
 
+//->
     template<
         typename D, typename C, typename F, typename MTag, typename DTag,
- typename T
+ typename... Args
>
- typename boost::disable_if<
- is_as_arg_list_adapter<
- typename boost::remove_cv<
- typename boost::remove_reference<T>::type
- >::type
- >
- >::type
- invoke(
+ D const&
+ csv(
         interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
- T&& t
+ Args&&... args
     )/*<-*/
     {
- interpreter( std::forward<T>( t ) );
+ return csv<1>( interpreter, std::forward<Args>( args )... );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename D, typename C, typename F, typename MTag, typename DTag,
- typename T, typename... Args>
- void csv(
- interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
- T&& t, Args&&... args
- )/*<-*/
- {
- invoke( interpreter, t );
- csv(
- interpreter,
- std::forward<Args>( args )...
- );
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+}// interpreter_aux
 
-//]
+using interpreter_aux::csv;
 
-}// interpreter_aux
+//]
 }// v2
 }// assign
 }// boost

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -15,7 +15,7 @@
 #include <boost/assign/v2/support/functor/value.hpp>
 #include <boost/assign/v2/interpreter/fwd.hpp>
 #include <boost/assign/v2/option/data.hpp>
-
+
 namespace boost{
 namespace assign{
 namespace v2{
@@ -23,24 +23,23 @@
 namespace switch_tag{
     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_)
+BOOST_ASSIGN_V2_SWITCH_CASE(0, container_aux::is_multi_array, kwd_element_)
+BOOST_ASSIGN_V2_SWITCH_CASE(1, container_aux::is_map, kwd_map_)
+BOOST_ASSIGN_V2_SWITCH_CASE_DEFAULT(2, kwd_value_)
 #undef BOOST_ASSIGN_V2_SWITCH_TAG
 /*->*/
 
 namespace interpreter_aux{
 
- template<
+ template<
         typename C // Value- or pointer-container
>
     struct deduce_data_generator/*<-*/
         : data_generator<
- C,
- typename switch_aux::result<
+ C,
+ typename switch_aux::result<
                 switch_tag::data_generator,
                 C
>::type

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/fwd.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/fwd.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/fwd.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -53,9 +53,6 @@
     template<typename Derived> struct replace_modifier_tag;
     template<typename Derived> struct replace_data_tag;
 
- template<typename R>
- struct as_arg_list_adapter;
-
 }// interpreter_aux
 }// v2
 }// assign

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -27,7 +27,7 @@
 
     template<
         typename C // Value- or pointer-container
- , typename F // Functor or keyword
+ , typename F // Functor or keyword
>
     struct data_generator/*<-*/
     {
@@ -37,21 +37,21 @@
     template<
         typename C // Multi-array
>
- struct data_generator<C, element_>/*<-*/
+ struct data_generator<C, kwd_element_>/*<-*/
     {
         typedef typename container_aux::element<C>::type element_;
         typedef functor_aux::value<element_> type;
     }/*->*/;
 
     template<typename C>
- struct data_generator<C, key_>/*<-*/
+ struct data_generator<C, kwd_key_>/*<-*/
     {
         typedef typename container_aux::key<C>::type key_;
         typedef functor_aux::value<key_> type;
     }/*->*/;
 
     template<typename C>
- struct data_generator<C, map_>/*<-*/
+ struct data_generator<C, kwd_map_>/*<-*/
     {
         typedef typename container_aux::key<C>::type key_;
         typedef typename container_aux::mapped<C>::type mapped_;
@@ -60,12 +60,12 @@
     }/*->*/;
 
     template<typename C>
- struct data_generator<C, use_default_>/*<-*/
+ struct data_generator<C, kwd_use_default_>/*<-*/
         : deduce_data_generator<C>
     {}/*->*/;
 
     template<typename C>
- struct data_generator<C, value_>/*<-*/
+ struct data_generator<C, kwd_value_>/*<-*/
     {
         typedef functor_aux::value<
             typename container_aux::value<C>::type
@@ -74,22 +74,22 @@
 
 namespace result_of{
 
- template<typename D, typename C, typename F = use_default_>
+ template<typename D, typename C, typename F = kwd_use_default_>
     struct option_data/*<-*/
         : ::boost::mpl::apply1<
- interpreter_aux::replace_data_generator<D>,
+ interpreter_aux::replace_data_generator<D>,
             typename data_generator<C, F>::type
>
     {}/*->*/;
-
+
 }// result_of
 
- // F is either a functor or one of the keywords :
+ // F is either a functor or one of the keywords :
     // element_, key_, map_, use_default_, value_
- template<typename F = ignore_>
+ template<typename F = kwd_ignore_>
     struct option_data/*<-*/
         : option_crtp<
- option_data<F>
+ option_data<F>
>
     {
         option_data(){}
@@ -97,7 +97,7 @@
 
         template<typename C>
         F const& get()const{ return this->f_; }
-
+
         private:
         F f_;
     }/*->*/;
@@ -106,32 +106,36 @@
     template<typename Kwd>
     struct option_data_helper
         : option_crtp<
- option_data<Kwd>
+ option_data<Kwd>
>
     {
         template<typename C>
- typename data_generator<C, Kwd>::type
+ typename data_generator<C, Kwd>::type
         get()const
- {
- return typename data_generator<C, Kwd>::type();
+ {
+ return typename data_generator<C, Kwd>::type();
         }
     };
-
-#define BOOST_ASSIGN_V2_MACRO(Kwd)\
+}// interpreter_aux
+#define BOOST_ASSIGN_V2_MACRO(Kwd, Alias)\
+namespace interpreter_aux{\
     template<>\
     struct option_data<Kwd>\
         : option_data_helper<Kwd>\
     {\
         option_data(){}\
- option_data(ignore_){}\
+ option_data(kwd_ignore_){}\
     };\
-/**/
-BOOST_ASSIGN_V2_MACRO(element_)
-BOOST_ASSIGN_V2_MACRO(key_)
-BOOST_ASSIGN_V2_MACRO(map_)
-BOOST_ASSIGN_V2_MACRO(use_default_)
-BOOST_ASSIGN_V2_MACRO(value_)
+}\
+typedef interpreter_aux::option_data<Kwd> Alias;\
+/**/
+BOOST_ASSIGN_V2_MACRO(kwd_element_, element_)
+BOOST_ASSIGN_V2_MACRO(kwd_key_, key_)
+BOOST_ASSIGN_V2_MACRO(kwd_map_, map_)
+BOOST_ASSIGN_V2_MACRO(kwd_use_default_, use_default_)
+BOOST_ASSIGN_V2_MACRO(kwd_value_, value_)
 #undef BOOST_ASSIGN_V2_MACRO
+namespace interpreter_aux{
 //->
 
     // Overrides data generator
@@ -146,10 +150,10 @@
         typedef typename result_of::option_data<
             D, C, F1
>::type result_;
- return result_(
- lhs.container(),
- rhs.template get<C>(),
- lhs.modifier
+ return result_(
+ lhs.container(),
+ rhs.template get<C>(),
+ lhs.modifier
         );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -36,7 +36,7 @@
         #ifdef BOOST_MSVC
         BOOST_TYPEOF_NESTED_TYPEDEF_TPL(nested, lhs % option )
         typedef typename nested::type type;
- #else
+ #else
         typedef BOOST_TYPEOF_TPL( lhs % option ) type;
         #endif
     };
@@ -44,16 +44,16 @@
     struct ignore_option{};
 
     template<typename Head>
- struct list_option_exit
- : boost::is_same<Head, nil_>
+ struct list_option_exit
+ : boost::is_same<Head, kwd_nil_>
     {};
 
 namespace result_of{
 
     template<
- typename Head,
- typename Tail,
- typename Lhs,
+ typename Head,
+ typename Tail,
+ typename Lhs,
         bool exit = list_option_exit<Head>::value
>
     struct apply_list_option
@@ -61,41 +61,41 @@
         typedef typename apply_list_option<
             typename Tail::head_type, typename Tail::tail_type, Lhs
>::type lhs_;
-
+
         typedef typename modulo_result<lhs_, Head>::type type;
     };
 
     template<
- typename Head,
- typename Tail,
+ typename Head,
+ typename Tail,
         typename Lhs
>
     struct apply_list_option<Head, Tail, Lhs, true>
     {
- typedef Lhs const& type;
+ typedef Lhs const& type;
     };
-
+
 }// result_of
-
+
     template<
- typename Head = nil_,
- typename Tail = nil_,
+ typename Head = kwd_nil_,
+ typename Tail = kwd_nil_,
         bool exit = list_option_exit<Head>::value
>
     struct list_option;
 
     template<typename Head, typename Tail, bool exit>
- struct list_option_inherit
+ struct list_option_inherit
         : Tail
     {
         list_option_inherit(){}
- list_option_inherit( Tail tail )
+ list_option_inherit( Tail tail )
             : Tail( tail )
         {}
     };
 
     template<typename Head, typename Tail, bool exit>
- struct list_option
+ struct list_option
         : list_option_inherit<Head, Tail, exit>
     {
 
@@ -107,13 +107,13 @@
         list_option(Tail tail, Head h)
             : super_t( tail ), head_( h )
         {}
-
+
         template<typename O>
         struct result
         {
             typedef list_option<O, list_option> type;
         };
-
+
         template<typename O>
         typename result<O>::type
         operator%(O option)const
@@ -121,10 +121,11 @@
             typedef typename result<O>::type result_;
             return result_( *this, option );
         }
-
+
         template<typename Lhs>
         typename boost::lazy_disable_if_c<
- exit, result_of::apply_list_option<Head, Tail, Lhs>
+ exit,
+ result_of::apply_list_option<Head, Tail, Lhs>
>::type
         apply(Lhs const& lhs)const
         {
@@ -135,19 +136,20 @@
 
         template<typename Lhs>
         typename boost::lazy_enable_if_c<
- exit, result_of::apply_list_option<Head, Tail, Lhs>
+ exit,
+ result_of::apply_list_option<Head, Tail, Lhs>
>::type
         apply(Lhs const& lhs)const{ return lhs; }
-
+
         private:
         Head head_;
-
+
     };
 
     typedef list_option<> empty_list_option;
 
     template<typename O>
- struct is_list_option
+ struct is_list_option
         : boost::is_base_of< empty_list_option, O>
     {};
 
@@ -161,7 +163,7 @@
>{};
 
     template<
- typename D, typename C, typename F, typename MTag, typename DTag,
+ typename D, typename C, typename F, typename MTag, typename DTag,
         typename H, typename T
>
     typename result_of::apply_list_option<H, T, D>::type
@@ -195,20 +197,25 @@
 namespace result_of{
 
     template<typename O1, typename O2>
- struct option_modulo
+ struct option_modulo
         : result_of::list_option_modulo<
             typename result_of::list_option_modulo<
                 empty_list_option,
                 O1
- >::type,
+ >::type,
             O2
>
     {};
 
 }// result_of
-
+
     template<typename O> struct option_crtp{};
 
+ template<typename O>
+ struct is_option_crtp/*<-*/
+ : boost::is_base_of< option_crtp<O>, O>
+ {}/*->*/;
+
     template<typename O1, typename O2>
     typename result_of::option_modulo<O1, O2>::type
     operator%(option_crtp<O1> const option1, O2 const& option2)
@@ -217,6 +224,14 @@
         return _option % ref % option2;
     }
 
+ template<typename O>
+ struct is_option/*<-*/
+ : ::boost::mpl::or_<
+ is_list_option<O>,
+ is_option_crtp<O>
+ >
+ {};
+
 }// interpreter_aux
 }// v2
 }// assign

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -25,23 +25,23 @@
 
     template<
         typename Keyword // A class of modifiers
- , typename Arg /*<-*/= ignore_/*->*/ // Specifies an aspect of the implementation
+ , typename Arg /*<-*/= kwd_ignore_/*->*/ // Specifies an aspect of the implementation
>
     struct option_modifier/*<-*/
         : option_crtp<
- option_modifier<Keyword, Arg>
+ option_modifier<Keyword, Arg>
>
     /*->*/
     {
-
+
         option_modifier(){}
         option_modifier(Arg arg)/*<-*/
             :arg_( arg )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
         Arg const& arg()const/*<-*/
- {
- return this->arg_;
+ {
+ return this->arg_;
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
         template<typename Arg1>
@@ -49,7 +49,7 @@
         operator=(const Arg1& arg1)const/*<-*/{
             return option_modifier<Keyword, Arg1>( arg1 );
         }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
+
 //<-
         protected:
         Arg arg_;
@@ -67,20 +67,20 @@
     };
 
 namespace result_of{
-
+
     template<typename D,typename Keyword, typename Arg>
     struct option_modifier /*<-*/ : ::boost::mpl::apply1<
- replace_modifier_tag<D>,
+ replace_modifier_tag<D>,
         typename ::boost::mpl::apply1<
- interpreter_aux::meta_modifier_tag<Keyword, Arg>,
+ interpreter_aux::meta_modifier_tag<Keyword, Arg>,
             D
>::type
>
     {}/*->*/;
-
+
 }// result_of
 
- template<typename D, typename C, typename F, typename MTag, typename DTag,
+ template<typename D, typename C, typename F, typename MTag, typename DTag,
         typename Keyword, typename Arg>
     typename result_of::option_modifier<D, Keyword, Arg>::type
     operator%(
@@ -94,7 +94,7 @@
         typedef typename result_of::option_modifier<
             D, Keyword, Arg
>::type result_;
-
+
         return result_(
             lhs.container(),
             lhs.fun,
@@ -111,7 +111,7 @@
 namespace result_of{
 
     template<typename D, typename Keyword, typename Arg>
- struct option_modifier
+ struct option_modifier
         : interpreter_aux::result_of::option_modifier<D, Keyword, Arg>
     {};
 
@@ -145,17 +145,16 @@
 /**/
 #endif
 
-#ifdef BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE
-#error
-#else
 #define BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME)\
     interpreter_aux::option_modifier<interpreter_aux::BOOST_PP_CAT(keyword_,NAME)>\
 /**/
-#endif
 
-#ifdef BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD
-#error
-#else
+#define BOOST_ASSIGN_V2_OPTION_MODIFIER_ALIAS(NAME)\
+ typedef\
+ BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME)\
+ BOOST_PP_CAT(NAME,_);\
+/**/
+
 #define BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(NAME)\
 namespace interpreter_aux{\
     struct BOOST_PP_CAT(keyword_,NAME){\
@@ -169,7 +168,6 @@
         = BOOST_ASSIGN_V2_OPTION_MODIFIER_KWD_TYPE(NAME)();\
 }\
 /**/
-#endif
 
 }// v2
 }// assign

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -25,20 +25,20 @@
 namespace assign{
 namespace v2{
 //[syntax_option_insert
-namespace modifier_tag{
+namespace modifier_tag{
 
- struct insert{};
+ struct insert{};
 
 }// modifier_tag
 namespace interpreter_aux{
-
- template<>
+
+ template<>
     class interpreter_modifier< modifier_tag::insert >/*<-*/
     {
 
         public:
         interpreter_modifier(){}
- interpreter_modifier( ignore_, ignore_ ){}
+ interpreter_modifier( kwd_ignore_, kwd_ignore_ ){}
 //<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
@@ -55,7 +55,7 @@
         {
             cont.insert( BOOST_ASSIGN_V2_forward );
         }
-
+
         template<typename C, typename T>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, data_tag::value_map )const
         {
@@ -74,7 +74,7 @@
         {
             typedef typename container_aux::key<C>::type key_;
             // non-const key necessary. See ptr_map.
- key_ k = BOOST_ASSIGN_V2_forward.first;
+ key_ k = BOOST_ASSIGN_V2_forward.first;
             typedef typename container_aux::mapped<C>::type m_;
             cont.insert( k , new m_( BOOST_ASSIGN_V2_forward.second ) );
         }
@@ -89,6 +89,7 @@
 }// interpreter_aux
 BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(insert)
 BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(insert, modifier_tag::insert)
+BOOST_ASSIGN_V2_OPTION_MODIFIER_ALIAS(insert)
 //]
 }// v2
 }// assign

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -26,9 +26,9 @@
 namespace assign{
 namespace v2{
 //[syntax_option_iterate
-namespace modifier_tag{
+namespace modifier_tag{
 
- template<typename Arg = functor_aux::iterate> struct iterate{};
+ template<typename Arg = functor_aux::iterate> struct iterate{};
 
 }// modifier_tag
 namespace interpreter_aux{
@@ -44,30 +44,30 @@
 #define BOOST_ASSIGN_V2_forward t
 #endif
 //->
-
+
     template<typename Arg>
     class interpreter_modifier< modifier_tag::iterate<Arg> >/*<-*/
     {
 
         typedef Arg arg_;
         // storing a copy of lambda::something has caused pbs, hence ptr
- typedef boost::shared_ptr<arg_> ptr_;
+ typedef boost::shared_ptr<arg_> ptr_;
 
         public:
-
+
         interpreter_modifier()
             : ptr( new arg_() )
         {}
- interpreter_modifier(
- ignore_,
- typename boost::call_traits<arg_>::param_type arg
+ interpreter_modifier(
+ kwd_ignore_,
+ typename boost::call_traits<arg_>::param_type arg
         ) : ptr( new arg_( arg ) )
         {}
 
         template<typename C, typename T>
         void impl(C& cont, BOOST_ASSIGN_V2_arg, data_tag::value )const
         {
- cont.at( (*this->ptr)() ) = BOOST_ASSIGN_V2_forward;
+ cont.at( (*this->ptr)() ) = BOOST_ASSIGN_V2_forward;
         }
 
         template<typename C, typename T>
@@ -76,7 +76,7 @@
             typedef typename container_aux::value<C>::type value_;
             cont.replace( (*this->ptr)(), new value_( BOOST_ASSIGN_V2_forward ) );
         }
-
+
         protected:
         ptr_ ptr;
 
@@ -90,6 +90,7 @@
 }// interpreter_aux
 BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(iterate)
 BOOST_ASSIGN_V2_OPTION_MODIFIER_META_MODIFIER_TAG(iterate, modifier_tag::iterate<Arg>)
+BOOST_ASSIGN_V2_OPTION_MODIFIER_ALIAS(iterate)
 //]
 }// v2
 }// assign

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -20,28 +20,32 @@
 namespace assign{
 namespace v2{
 //[syntax_option_mapped
-namespace modifier_tag{
+namespace modifier_tag{
 
- template<typename Arg> struct mapped{};
+ template<typename Arg> struct mapped{};
 
 }// modifier_tag
 namespace interpreter_aux{
-
+
     template<typename Arg>
     class interpreter_modifier<modifier_tag::mapped<Arg> >/*<-*/
     {
 
         typedef Arg arg_;
         // storing a copy of lambda::something has caused pbs, hence ptr
- typedef boost::shared_ptr<arg_> ptr_;
-
+ typedef boost::shared_ptr<arg_> ptr_;
+
         public:
 
- interpreter_modifier() : ptr( new arg_() ){}
+ interpreter_modifier()
+ : ptr( new arg_() )
+ {}
+
         interpreter_modifier(
- ignore_,
+ kwd_ignore_,
             typename boost::call_traits<arg_>::param_type arg
- ) : ptr( new arg_( arg ) )
+ )
+ : ptr( new arg_( arg ) )
         {}
 
 //<-

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -25,11 +25,12 @@
 namespace assign{
 namespace v2{
 //[syntax_option_row_major
-namespace modifier_tag{
+namespace modifier_tag{
 
- template<typename Arg = functor_aux::iterate> struct row_major{};
+ template<typename Arg = functor_aux::iterate> struct row_major{};
 
 }// modifier_tag
+ typedef modifier_tag::row_major<> row_major_;
 namespace interpreter_aux{
 
 //<-
@@ -48,7 +49,7 @@
     {
         typedef std::size_t size_type;
         typedef row_major<Dim + 1, NumDims> nested_;
-
+
         template<typename Array, typename T>
         static void assign(Array& array, size_type remainder, BOOST_ASSIGN_V2_arg )
         {
@@ -63,7 +64,7 @@
     struct row_major<Dim, NumDims, true>
     {
         typedef std::size_t size_type;
-
+
         template<typename E, typename T>
         static void assign(E& elem, size_type index, BOOST_ASSIGN_V2_arg)
         {
@@ -85,16 +86,16 @@
     {
 
         typedef Arg arg_;
- typedef boost::shared_ptr<arg_> ptr_;
+ typedef boost::shared_ptr<arg_> ptr_;
 
         public:
         interpreter_modifier()
             : ptr( new arg_() )
         {}
         interpreter_modifier(
- ignore_,
- typename boost::call_traits<arg_>::param_type arg
- )
+ kwd_ignore_,
+ typename boost::call_traits<arg_>::param_type arg
+ )
             : ptr( new arg_( arg ) )
         {}
 
@@ -112,7 +113,7 @@
 #undef BOOST_ASSIGN_V2_arg
 #undef BOOST_ASSIGN_V2_forward
 //->
-
+
 }// interpreter_aux
 //]
 BOOST_ASSIGN_V2_OPTION_MODIFIER_KEYWORD(row_major)

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/std.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -76,19 +76,22 @@
     {\
         public:\
         interpreter_modifier(){}\
- interpreter_modifier( ignore_, ignore_ ){}\
+ interpreter_modifier( kwd_ignore_, kwd_ignore_ ){}\
         BOOST_ASSIGN_V2_OPTION_STD_MODIFIER_IMPL(FUN)\
     };\
 \
 }\
-namespace{\
 \
- interpreter_aux::option_modifier<\
+ typedef interpreter_aux::option_modifier<\
         interpreter_aux::keyword_std_modifier,\
         modifier_tag::FUN\
- > const\
+ > BOOST_PP_CAT(FUN,_);\
+\
+namespace{\
+\
+ BOOST_PP_CAT(FUN,_) const\
         BOOST_PP_CAT(_,FUN) = ( \
- _std_modifier = modifier_tag::FUN() \
+ _std_modifier = modifier_tag::FUN()\
     );\
 \
 }\

Modified: sandbox/assign_v2/boost/assign/v2/put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -11,6 +11,7 @@
 #define BOOST_ASSIGN_V2_PUT_ER_2011_HPP
 #include <boost/assign/v2/put/csv_put.hpp>
 #include <boost/assign/v2/put/delay_csv_put.hpp>
+#include <boost/assign/v2/put/delay_put.hpp>
 #include <boost/assign/v2/put/put.hpp>
 
 #endif // BOOST_ASSIGN_V2_PUT_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/cpp03/csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/cpp03/csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/cpp03/csv_put.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -10,10 +10,7 @@
 #ifndef BOOST_ASSIGN_V2_PUT_CPP03_CSV_PUT_ER_2011_HPP
 #define BOOST_ASSIGN_V2_PUT_CPP03_CSV_PUT_ER_2011_HPP
 #include <boost/assign/v2/support/config/limit_csv_arity.hpp>
-#include <boost/preprocessor/control.hpp>
-#include <boost/preprocessor/repetition.hpp>
-// This is to ensure that cpp03/csv_put.hpp compiles as standalone (but it's
-// better to simply include the header below, instead)
+#include <boost/assign/v2/support/pp/parameter_list.hpp>
 #include <boost/assign/v2/put/csv_put.hpp>
 
 namespace boost{
@@ -21,41 +18,128 @@
 namespace v2{
 namespace interpreter_aux{
 
-#define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
- template<typename C, typename O, BOOST_PP_ENUM_PARAMS(N, typename T)>\
- typename boost::enable_if<\
- is_list_option<O>\
- >::type csv_put(\
- C& cont, O const& options,\
- BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
+#define BOOST_ASSIGN_V2_CSV_PUT_NESTED_ITER(z, N, SeqU)\
+ template<\
+ int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ , typename C\
+ >\
+ typename boost::enable_if_c<I == BOOST_PP_SEQ_SIZE(SeqU)>::type\
+ csv_put\
+ (\
+ C& cont,\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
     )\
     {\
- csv(\
- make_csv_ready( put( cont ) % options ) \
- , BOOST_PP_ENUM_PARAMS(N, _)\
+ csv<I, BOOST_PP_SEQ_ENUM(SeqU)>(\
+ put( cont )\
+ BOOST_PP_ENUM_TRAILING_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
         );\
     }\
- template<typename C, BOOST_PP_ENUM_PARAMS(N, typename T)>\
- typename boost::disable_if<\
- is_list_option<T0>\
- >::type csv_put(\
+ template<\
+ typename Options,\
+ int I, BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ , typename C\
+ >\
+ typename boost::enable_if_c<I == BOOST_PP_SEQ_SIZE(SeqU)>::type\
+ csv_put\
+ (\
         C& cont,\
- BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ )\
+ {\
+ csv<I, BOOST_PP_SEQ_ENUM(SeqU)>(\
+ put( cont ) % Options()\
+ BOOST_PP_ENUM_TRAILING_PARAMS(\
+ BOOST_PP_MUL( N, BOOST_PP_SEQ_SIZE(SeqU) ),\
+ _\
+ )\
+ );\
+ }\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_PUT_ITER(r, SeqU)\
+ BOOST_PP_REPEAT_FROM_TO(\
+ 1,\
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),\
+ BOOST_ASSIGN_V2_CSV_PUT_NESTED_ITER,\
+ SeqU\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_PUT_CONST_NON_CONST_OVERLOAD(z, I, data)\
+ BOOST_PP_SEQ_FOR_EACH_PRODUCT(\
+ BOOST_ASSIGN_V2_CSV_PUT_ITER,\
+ BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD(z, I, pos)\
+ BOOST_ASSIGN_V2_CSV_PUT_ITER(\
+ ~,\
+ BOOST_ASSIGN_V2_CSV_SEQ2(pos, I)\
+ )\
+/**/
+
+BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_ASSIGN_V2_CSV_PUT_CONST_NON_CONST_OVERLOAD,
+ ~
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD,
+ 0
+)
+
+BOOST_PP_REPEAT_FROM_TO(
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
+ BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD,
+ 1
+)
+
+#undef BOOST_ASSIGN_V2_CSV_PUT_NESTED_ITER
+#undef BOOST_ASSIGN_V2_CSV_PUT_ITER
+#undef BOOST_ASSIGN_V2_CSV_PUT_CONST_NON_CONST_OVERLOAD
+#undef BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD
+
+#define BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD_VARIADIC(z, N, is_const)\
+ template<typename Options, typename C BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)>\
+ void csv_put(\
+ C& cont\
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
+ )\
+ {\
+ csv(\
+ put<Options, C>( cont )\
+ BOOST_PP_ENUM_TRAILING_PARAMS(N, _)\
+ );\
+ }\
+ template<typename C BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)>\
+ void csv_put(\
+ C& cont\
+ BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\
     )\
     {\
- csv( make_csv_ready( put( cont ) ), BOOST_PP_ENUM_PARAMS(N, _) );\
+ csv( put( cont ) BOOST_PP_ENUM_TRAILING_PARAMS(N, _) );\
     }\
 /**/
 BOOST_PP_REPEAT_FROM_TO(
     1,
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD_VARIADIC,
     0
 )
 BOOST_PP_REPEAT_FROM_TO(
     1,
     BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_CSV_ARITY),
- BOOST_ASSIGN_V2_MACRO,
+ BOOST_ASSIGN_V2_CSV_PUT_OVERLOAD_VARIADIC,
     1
 )
 #undef BOOST_ASSIGN_V2_MACRO

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -14,7 +14,6 @@
 #include <boost/assign/v2/put/put.hpp>
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 #include <boost/assign/v2/support/pp/ignore.hpp>
-#include <boost/utility/enable_if.hpp>
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <utility>
 #endif
@@ -24,117 +23,46 @@
 namespace v2{
 //[syntax_csv_put
 namespace interpreter_aux{
-/*<-*/
- template<typename F>
- struct csv_ready
- : ::boost::mpl::true_
- {};
-
- template<typename T, typename K, typename M>
- struct csv_ready<
- functor_aux::pair<T, K, M>
- >
- : ::boost::mpl::false_
- {};
-
-namespace result_of{
-
- template<typename C, typename F, typename MTag, typename DTag>
- struct if_csv_ready
- : ::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_
- >
- {};
-
- 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>
- >
- {};
-
-}// result_of
-
- template<typename C, typename F, typename MTag, typename DTag>
- typename result_of::if_csv_ready<C, F, MTag, DTag>::type
- make_csv_ready(
- put_interpreter<C, F, MTag, DTag> const& interpreter,
- boost::mpl::true_ suitable
- )
- {
- return interpreter;
- }
-
- template<typename C, typename F, typename MTag, typename DTag>
- typename result_of::else_csv_ready<C, F, MTag, DTag>::type
- make_csv_ready(
- put_interpreter<C, F, MTag, DTag> const& interpreter,
- boost::mpl::false_ suitable
- )
- {
- return interpreter % ( _data = _value );
- }
-
- template<typename C, typename F, typename MTag, typename DTag>
- typename result_of::make_csv_ready<C, F, MTag, DTag>::type
- make_csv_ready( put_interpreter<C, F, MTag, DTag> const& interpreter)
- {
- return make_csv_ready(
- interpreter,
- typename csv_ready<F>::type()
- );
- }
-
-/*->*/
 //<-
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
 
- template<typename C, typename O, typename... Args>
- /*<-*/typename boost::enable_if<
- is_list_option<O>
- >::type BOOST_ASSIGN_V2_IGNORE(/*->*/void /*<-*/)
- /*->*/csv_put(
- C& cont,
- O const& option,
- Args&&... args
- )/*<-*/
+ template<typename C, typename... Args>
+ void csv_put(C& cont, Args&&... args)/*<-*/
     {
         csv(
- make_csv_ready(
- put( cont ) % option
- ),
+ put( cont ),
             std::forward<Args>( args )...
         );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename C, typename T, typename... Args>
- /*<-*/typename boost::disable_if<
- is_list_option_cpp0x<T>
- >::type BOOST_ASSIGN_V2_IGNORE(/*->*/void /*<-*/)
- /*->*/csv_put( C& cont, T&& t, Args&&... args)/*<-*/
+ template<int I, typename ...Cast, typename C, typename... Args>
+ void csv_put(C& cont, Args&&... args)/*<-*/
     {
- csv(
- make_csv_ready( put( cont ) ),
- std::forward<T>( t ),
- std::forward<Args>( args )...
+ csv<I, Cast...>(
+ put( cont ),
+ std::forward<Args>( args )...
         );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename C>
- void csv_put( C& cont )/*<-*/
+ // Default constructible options
+
+ template<typename Options, typename C, typename... Args>
+ void csv_put(C& cont, Args&&... args)/*<-*/
     {
         csv(
- make_csv_ready( put( cont ) )
+ put<Options, C>( cont ),
+ std::forward<Args>( args )...
+ );
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+ template<typename Options,
+ int I, typename ...Cast, typename C, typename... Args>
+ void csv_put(C& cont, Args&&... args)/*<-*/
+ {
+ csv<I, Cast...>(
+ put( cont ) % Options(),
+ std::forward<Args>( args )...
         );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 

Modified: sandbox/assign_v2/boost/assign/v2/put/delay_csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/delay_csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/delay_csv_put.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,97 +9,119 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_DELAY_CSV_PUT_ER_2011_HPP
 #define BOOST_ASSIGN_V2_PUT_DELAY_CSV_PUT_ER_2011_HPP
-#include <boost/assign/v2/support/config/enable_cpp0x.hpp>
-#include <boost/assign/v2/support/pp/ignore.hpp>
-#include <boost/assign/v2/interpreter/as_arg_list.hpp>
-#include <boost/assign/v2/put/csv_put.hpp>
-#include <boost/assign/v2/option/list.hpp>
-#include <boost/config.hpp>
+#include <boost/assign/v2/deque/csv_deque.hpp>
+#include <boost/assign/v2/put/delay_put.hpp>
+
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <utility>
-#endif
+#include <tuple>
+#include <boost/assign/v2/support/pp/ignore.hpp>
+#include <boost/assign/v2/support/traits/type/add_ref_const.hpp>
+#include <boost/assign/v2/support/mpl/variadic_args_to_indices.hpp>
+#include <boost/type_traits/add_const.hpp>
 
 namespace boost{
 namespace assign{
 namespace v2{
 //[syntax_delay_csv_put
 namespace interpreter_aux{
+namespace result_of{
 
- template<typename R, typename O = empty_list_option>
- struct delayed_csv_put/*<-*/
+//<-
+ template<typename Options, int I>
+ struct delay_csv_put_helper
     {
+ template<typename CastHolder, typename ArgsHolder>
+ struct apply{};
 
- O const& options()const{ return this->options_; }
- as_arg_list_adapter<R> const& arg_list()const
+ template<typename...Cast, typename... Args>
+ struct apply<pack_holder<Cast...>, pack_holder<Args...> >
         {
- return this->arg_list_;
- }
-
- explicit delayed_csv_put(R& r)
- : arg_list_( r )
- {}
-
- delayed_csv_put(O options, R& r)
- : options_( options ), arg_list_( r )
- {}
-
- private:
- O options_;
- as_arg_list_adapter<R> arg_list_;
-
- }/*->*/;
-
- template<typename C, typename R>
- C& operator|(C& cont, delayed_csv_put<R> const& rhs)/*<-*/
- {
- csv_put( cont, rhs.arg_list() );
- return cont;
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
- template<typename C, typename R, typename O>
- C& operator|(C& cont, delayed_csv_put<R, O> const& rhs)/*<-*/
- {
- csv_put( cont, rhs.options(), rhs.arg_list() );
- return cont;
- }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
-namespace result_of{
-
- template<typename R, typename O = empty_list_option>
+ typedef pack_holder<
+ typename type_traits::add_ref_const<Cast>::type...
+ > head_;
+ typedef pack_holder<Args...> tail_;
+ typedef typename csv_cast<I, head_, tail_>::type cast_;
+
+ typedef typename csv_tuple_head<
+ I, pack_holder<>, pack_holder<Args...>
+ >::type tuple_;
+ typedef typename result_of::csv_deque<tuple_>::type cont_;
+ typedef put_for_each_adapter<
+ typename boost::add_const<cont_>::type,
+ Options,
+ I
+ > type;
+
+ static type call(Options const& options, Args&&... args)
+ {
+ return type( options, v2::csv_deque<tuple_, I>(
+ std::forward<Args>( args )...
+ ) );
+ }
+ };
+ };
+
+//->
+ template<
+ typename Options,
+ typename CastHolder, typename ArgsHolder,
+ int I
+ >
     struct delay_csv_put/*<-*/
- {
- typedef delayed_csv_put<R, O> type;
- }/*->*/;
+ : delay_csv_put_helper<Options, I>:: template apply<
+ CastHolder, ArgsHolder
+ >
+ {}/*->*/;
 
 }// result_of
 
- template<typename R>
- typename result_of::delay_csv_put<R const>::type
- delay_csv_put(R const& range)/*<-*/
- {
- return delayed_csv_put<R const>( range );
+ template<typename Options, int I, typename ...Cast, typename...Args>
+/*<-*/
+ typename result_of::delay_csv_put<
+ Options,
+ pack_holder<Cast...>,
+ pack_holder<Args...>,
+ I
+ >::type/*->*/
+ /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)/*->*/
+ delay_csv_put(Args&&... args)/*<-*/
+ {
+ typedef result_of::delay_csv_put<
+ Options,
+ pack_holder<Cast...>,
+ pack_holder<Args...>,
+ I
+ > meta_;
+ return meta_::call( Options(), std::forward<Args>( args )... );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename O, typename R>
- typename result_of::delay_csv_put<R const, O>::type
- delay_csv_put(O const& options, R const& range)/*<-*/
- {
- return delayed_csv_put<R const, O>( options, range );
+ template<int I, typename ...Cast, typename...Args>
+/*<-*/
+ typename result_of::delay_csv_put<
+ empty_list_option_,
+ pack_holder<Cast...>,
+ pack_holder<Args...>,
+ I
+ >::type/*->*/
+ /*<-*/BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)/*->*/
+ delay_csv_put(Args&&... args)/*<-*/
+ {
+ return delay_csv_put<empty_list_option_, I, Cast...>(
+ std::forward<Args>(args)...
+ );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
 }// interpreter_aux
 
- using interpreter_aux::delay_csv_put;
-
-namespace result_of{
-
- using interpreter_aux::result_of::delay_csv_put;
+using interpreter_aux::delay_csv_put;
 
-}// result_of
 //]
-
 }// v2
 }// assign
 }// boost
 
+#else
+#include <boost/assign/v2/put/cpp03/delay_csv_put.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
 #endif // BOOST_ASSIGN_V2_PUT_DELAY_CSV_PUT_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/put.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,10 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_PUT_ER_2011_HPP
 #define BOOST_ASSIGN_V2_PUT_PUT_ER_2011_HPP
-#include <boost/assign/v2/interpreter/crtp.hpp>
-#include <boost/assign/v2/interpreter/data.hpp>
-#include <boost/assign/v2/interpreter/modifier.hpp>
-#include <boost/assign/v2/interpreter/replace.hpp>
+#include <boost/assign/v2/interpreter.hpp>
+#include <boost/assign/v2/option/list.hpp>
 #include <boost/assign/v2/support/pp/ignore.hpp>
 #include <boost/assign/v2/ref/wrapper/copy.hpp>
 
@@ -27,20 +25,20 @@
 //<-
         protected ref::copy_wrapper< C >::type,
 //->
- public interpreter_aux::interpreter_crtp<
- put_interpreter<C, F, MTag, DTag>
+ public interpreter_aux::interpreter_crtp<
+ put_interpreter<C, F, MTag, DTag>
             , C, F, MTag, DTag
>
     {
 //<-
- typedef interpreter_aux::interpreter_crtp<
+ typedef interpreter_aux::interpreter_crtp<
             put_interpreter
- , C, F, MTag, DTag
+ , C, F, MTag, DTag
> super2_t;
 //->
         public:
 
- typedef /*<-*/ typename super2_t::result_type
+ typedef /*<-*/ typename super2_t::result_type
             BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)/*->*/result_type;
 //<-
         protected:
@@ -68,60 +66,69 @@
     };
 
     template<typename C, typename F, typename MTag, typename DTag>
- struct replace_data_generator<
- interpreter_aux::put_interpreter<C, F, MTag, DTag>
+ struct replace_data_generator<
+ interpreter_aux::put_interpreter<C, F, MTag, DTag>
>{
         template<typename F1>
- struct apply/*<-*/{
+ struct apply/*<-*/{
             typedef interpreter_aux::put_interpreter<
                 C, F1, MTag, DTag
- > type;
+ > type;
         }/*->*/;
     };
 
     template<typename C, typename F, typename MTag, typename DTag>
- struct replace_modifier_tag<
- interpreter_aux::put_interpreter<C, F, MTag, DTag>
+ struct replace_modifier_tag<
+ interpreter_aux::put_interpreter<C, F, MTag, DTag>
>{
         template<typename MTag1>
- struct apply/*<-*/{
+ struct apply/*<-*/{
             typedef interpreter_aux::put_interpreter<
                 C, F, MTag1, DTag
- > type;
+ > type;
         }/*->*/;
     };
 
     template<typename C, typename F, typename MTag, typename DTag>
- struct replace_data_tag<
- interpreter_aux::put_interpreter<C, F, MTag, DTag>
+ struct replace_data_tag<
+ interpreter_aux::put_interpreter<C, F, MTag, DTag>
>{
         template<typename DTag1>
- struct apply/*<-*/{
+ struct apply/*<-*/{
             typedef interpreter_aux::put_interpreter<
                 C, F, MTag, DTag1
- > type;
+ > type;
         }/*->*/;
     };
 
-}// interpreter_aux
 namespace result_of{
 
     template<
         typename C/*<-*/
- , typename DGen
- = typename interpreter_aux::deduce_data_generator<C>::type
+ , typename DGen
+ = typename interpreter_aux::deduce_data_generator<C>::type
+ /*->*/
>
- struct put/*<-*/{
- typedef
+ struct put/*<-*/
+ {
+ typedef
             interpreter_aux::put_interpreter<
                 C
                 , DGen
                 , typename interpreter_aux::deduce_modifier_tag<C>::type
                 , typename interpreter_aux::deduce_data_tag<C>::type
- >
+ >
         type;
     }/*->*/;
 
+ template<typename O, typename C>
+ struct put_option
+ /*<-*/
+ {
+ typedef typename result_of::put<C>::type put_;
+ typedef typename modulo_result<put_, O>::type type;
+ }/*->*/;
+
 }// result_of
 
     template<typename C>
@@ -132,6 +139,26 @@
         return result_( cont );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+ // Default constructible options
+
+ template<typename Options, typename C>
+ typename result_of::put_option<Options, C>::type
+ put( C& cont )/*<-*/
+ {
+ Options options;
+ return put( cont ) % options;
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
+}// interpreter_aux
+namespace result_of
+{
+ using interpreter_aux::result_of::put;
+ using interpreter_aux::result_of::put_option;
+
+}// result_of
+
+ using interpreter_aux::put;
+
 //]
 
 }// v2

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -24,7 +24,7 @@
 namespace array_aux{
 
     template<typename T>
- struct empty_array
+ struct empty_array
         : empty_list<list_aux::array_tag>
     {};
 
@@ -36,7 +36,7 @@
     };
 
     template<typename T>
- struct recursive_result<0, T>
+ struct recursive_result<0, T>
         : empty_array<T>
     {};
 
@@ -58,7 +58,7 @@
     {}/*->*/;
 
     template<typename U>
- struct array<U, nil_>/*<-*/
+ struct array<U, kwd_nil_>/*<-*/
         : nth_result_of::array<0, U>
     {}/*->*/;
 
@@ -66,8 +66,8 @@
 
     // Generates an empty array
     template<typename T>
- typename result_of::array<T, nil_>::type
- array( nil_ )/*<-*/
+ typename result_of::array<T, kwd_nil_>::type
+ array( kwd_nil_ )/*<-*/
     {
         return ref::list<list_aux::array_tag>( v2::_nil );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/

Modified: sandbox/assign_v2/boost/assign/v2/ref/array/csv_array.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/array/csv_array.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/array/csv_array.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -66,7 +66,7 @@
 
 //<-
     template<size_type I, typename R>
- void csv_assign( R& result ){}
+ void csv_assign( R& /*unused*/){}
 
     template<size_type I, typename R, typename U, typename... Args>
     void csv_assign( R& result, U& u, Args&...args )

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/policy.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/policy.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/policy.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -65,7 +65,7 @@
     };
 
     template<typename U1>
- struct policy_helper2<U1, void_, nil_ >
+ struct policy_helper2<U1, void_, kwd_nil_ >
     {
         // Reached root
         typedef U1 type;
@@ -79,7 +79,7 @@
>{};
 
     template<>
- struct policy_helper3<void_, nil_ >
+ struct policy_helper3<void_, kwd_nil_ >
     {
         // Empty container
         typedef void_ type;
@@ -89,7 +89,7 @@
     struct policy<array_tag>
     {
 
- template<typename H = void_, typename T = nil_>
+ template<typename H = void_, typename T = kwd_nil_>
         struct apply
         {
             typedef alloc_tag::lazy_alloc tag_;

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/rebind.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/rebind.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/array/rebind.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -48,8 +48,10 @@
         // GCC4.4 wants fully qual at
         a[ K - 1 ].rebind( ref::at<K-1>( l ) ) ;
         typedef index_ next_size_;
- typedef ::boost::mpl::size_t<0> zero_;
- typedef typename ::boost::mpl::equal_to<next_size_,zero_>::type exit_;
+ typedef ::boost::mpl::int_<0> zero_;
+ typedef typename ::boost::mpl::equal_to<
+ next_size_, zero_
+ >::type exit_;
         assign_array<K-1>( exit_(), a, l );
     }
 

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/at.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/at.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/at.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -40,38 +40,38 @@
         ,at_list<I, typename tail_of<T>::type>
>{};
 
- template<size_type I, typename T>
- typename boost::lazy_enable_if<
- list_aux::is_head<I, T>,
- list_aux::at_list<I, T>
- >::type
- at_helper(T const& t)
- {
- return t.head();
- }
-
- template<size_type I, typename T>
- typename boost::lazy_disable_if<
- is_head<I, T>,
- list_aux::at_list<I, T>
- >::type
- at_helper(T const& t)
- {
- return at_helper<I>( t.tail() );
- }
-
- template<size_type I, typename Tag, typename H, typename T>
- typename list_aux::at_list<I, container<Tag, H, T> >::type
- at(container<Tag, H, T> const& t)
- {
- return at_helper<I>( t );
- }
+ template<size_type I, typename T>
+ typename boost::lazy_enable_if<
+ list_aux::is_head<I, T>,
+ list_aux::at_list<I, T>
+ >::type
+ at_helper(T const& t)
+ {
+ return t.head();
+ }
+
+ template<size_type I, typename T>
+ typename boost::lazy_disable_if<
+ is_head<I, T>,
+ list_aux::at_list<I, T>
+ >::type
+ at_helper(T const& t)
+ {
+ return at_helper<I>( t.tail() );
+ }
+
+ template<size_type I, typename Tag, typename H, typename T>
+ typename list_aux::at_list<I, container<Tag, H, T> >::type
+ at(container<Tag, H, T> const& t)
+ {
+ return at_helper<I>( t );
+ }
 
 }// list_aux
 using list_aux::at;
 
     template<list_aux::size_type I, typename T>
- struct list_at
+ struct list_at
         : list_aux::at_list<I, T>
     {};
 

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -39,7 +39,7 @@
 
         public:
 
- typedef boost::is_same<T, nil_> is_empty;
+ typedef boost::is_same<T, kwd_nil_> is_empty;
 
         container(){}
 
@@ -50,22 +50,22 @@
         };
 
         container(typename call_traits<T>::param_type t, H h)
- : tail_holder_( t ),
+ : tail_holder_( t ),
             head_holder_( h )
         {}
 
         template<typename H1>
         typename result<H1&>::type
- operator()(H1& h)const{
- return this->impl( h );
+ operator()(H1& h)const{
+ return this->impl( h );
         }
 
         template<typename H1>
         typename result<H1 const&>::type
- operator()(H1 const& h)const{
- return this->impl( h );
+ operator()(H1 const& h)const{
+ return this->impl( h );
         }
-
+
         protected:
 
         template<typename H1>

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/fwd.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/fwd.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/fwd.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -23,7 +23,7 @@
 
     struct void_;
 
- template<typename Tag, typename H = void_, typename T = nil_>
+ template<typename Tag, typename H = void_, typename T = kwd_nil_>
     class container;
 
 }// list_aux

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -32,20 +32,20 @@
> tail_static_size;
         typedef T const& result_of_tail_type;
 
- tail_holder(typename boost::call_traits<T>::param_type t)
+ tail_holder(typename boost::call_traits<T>::param_type t)
             : tail_( t )
         {}
-
+
         result_of_tail_type tail()const{ return this->tail_; }
 
         private:
- typename boost::call_traits<T>::value_type tail_;
+ typename boost::call_traits<T>::value_type tail_;
     };
 
     template<>
- struct tail_holder<nil_>
+ struct tail_holder<kwd_nil_>
     {
- typedef nil_ tail_type;
+ typedef kwd_nil_ tail_type;
         typedef ::boost::mpl::size_t<0> tail_static_size;
         tail_holder(){}
 

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/list.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -35,7 +35,7 @@
         typedef typename empty_list<Tag>::type empty_list_;
 
         template<typename State, typename T>
- struct result
+ struct result
             : State::template result<T>
         {};
 
@@ -52,13 +52,13 @@
 
     template<typename Tag>
     typename ::boost::mpl::apply1<
- cumul_result_of::list<Tag>,
+ cumul_result_of::list<Tag>,
         ::boost::mpl::vector0<>
>::type
- list( nil_ )
+ list( kwd_nil_ )
     {
         return typename ::boost::mpl::apply1<
- cumul_result_of::list<Tag>,
+ cumul_result_of::list<Tag>,
             ::boost::mpl::vector0<>
>::type();
     }
@@ -67,8 +67,8 @@
 
 using list_aux::list;
 
-template<typename Tag>
-struct empty_list
+template<typename Tag>
+struct empty_list
     : list_aux::empty_list<Tag>
 {};
 

Modified: sandbox/assign_v2/boost/assign/v2/support/config/borland_workaround.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/config/borland_workaround.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/config/borland_workaround.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,9 +1 @@
-
-// Maybe needed for unit testing
-
-#include <boost/detail/workaround.hpp>
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-# pragma warn -8091 // supress warning in Boost.Test
-# pragma warn -8057 // unused argument argc/argv in Boost.Test
-#endif
+// TODO remove file

Modified: sandbox/assign_v2/boost/assign/v2/support/config/limit_arity.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/config/limit_arity.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/config/limit_arity.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,44 +1,2 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2011 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 BOOST_ASSIGN_V2_LIMIT_ARITY_ER_2011_HPP
-#define BOOST_ASSIGN_V2_LIMIT_ARITY_ER_2011_HPP
-#include <boost/assign/v2/support/pp/parameter_list.hpp>
-#include <boost/mpl/limits/arity.hpp>
-#include <boost/preprocessor/comparison/greater.hpp>
-#include <boost/preprocessor/selection/min.hpp>
+// TODO remove file
 
-#ifndef BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE
-#error
-#endif
-
-#ifndef BOOST_ASSIGN_V2_LIMIT_ARITY
-//[limit_arity
-/* n = BOOST_ASSIGN_V2_LIMIT_ARITY
- Overload | Arity
- -------------------------------------
- functor() | 0
- functor(x[0]) | 1
- functor(x[0], x[1]) | 2
- ...
- functor(x[0], ..., x[n-1]) | n
-*/
-
-#define BOOST_ASSIGN_V2_LIMIT_ARITY BOOST_PP_MIN( BOOST_MPL_LIMIT_METAFUNCTION_ARITY, BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE )
-//]
-#endif // BOOST_ASSIGN_V2_LIMIT_ARITY
-
-//[limit_arity_requirement
-// Some result_of:: meta-functions expect an mpl-vector as template parameter
-#if BOOST_PP_GREATER( BOOST_ASSIGN_V2_LIMIT_ARITY, BOOST_MPL_LIMIT_METAFUNCTION_ARITY )
-#error
-#endif // BOOST_ASSIGN_V2_LIMIT_ARITY
-//]
-
-#endif // BOOST_ASSIGN_V2_LIMIT_ARITY_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/support/config/limit_csv_arity.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/config/limit_csv_arity.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/config/limit_csv_arity.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -17,6 +17,6 @@
    ...
    csv_fun(t[0], ...., t[n-1]) | n
 */
-#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 20
+#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 12
 //]
 #endif // BOOST_ASSIGN_V2_LIMIT_CSV_ARITY

Modified: sandbox/assign_v2/boost/assign/v2/support/config/limit_lvalue_const_arity.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/config/limit_lvalue_const_arity.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/config/limit_lvalue_const_arity.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,29 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2011 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 BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY_ER_2011_HPP
-#define BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY_ER_2011_HPP
-#include <boost/assign/v2/support/config/limit_arity.hpp>
-#include <boost/preprocessor/comparison/greater.hpp>
-//[limit_lvalue_const_arity
-/*
- Maximum arity for which functors are overloaded for any combination of const
- and non-const lvalues under C++03. Be warned that the number of function
- overloads increases geometrically with this number.
-*/
-#ifndef BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
-#define BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY 2
-#endif
-//]
-//[limit_lvalue_const_arity_requirement
-#if BOOST_PP_GREATER( BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY, BOOST_ASSIGN_V2_LIMIT_ARITY )
-#error
-#endif
-//]
-#endif // BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY_ER_2011_HPP
\ No newline at end of file
+// TODO remove file

Modified: sandbox/assign_v2/boost/assign/v2/support/functor/crtp_unary_and_up.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/functor/crtp_unary_and_up.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/functor/crtp_unary_and_up.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -21,8 +21,8 @@
 // arguments, while allowing within a certain limit, any mixture of
 // lvalue and rvalues. Specifically,
 // let
-// m = BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
-// n = BOOST_ASSIGN_V2_LIMIT_ARITY
+// m = BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY
+// n = BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY
 //
 // Given a metafunction class, F, and a derived class, D, that defines
 // template<typename T0, ..., typename Tk>
@@ -33,7 +33,7 @@
 // const arguments for k = 0, ..., m-1, and either only lvalues or only const
 // for k = m, ..., n-1.
 
-#include <boost/preprocessor/arithmetic/inc.hpp>
+#include <boost/preprocessor/arithmetic.hpp>
 #include <boost/preprocessor/repetition.hpp>
 #include <boost/preprocessor/seq.hpp>
 
@@ -50,8 +50,8 @@
 #include <boost/type_traits/is_const.hpp>
 #include <boost/utility/enable_if.hpp>
 
-#include <boost/assign/v2/support/config/limit_arity.hpp>
-#include <boost/assign/v2/support/config/limit_lvalue_const_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_const_non_const_arity.hpp>
 #include <boost/assign/v2/support/pp/parameter_list.hpp>
 
 namespace boost{
@@ -72,26 +72,29 @@
 // Non-const/const overloads :
 
 #define BOOST_ASSIGN_V2_MACRO1(r, SeqU) \
- template<BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)> \
- typename ::boost::mpl::apply1< \
- F, \
- ::boost::mpl::vector<BOOST_ASSIGN_V2_TPL_ARG_LIST(SeqU)> \
- >::type \
- operator()( BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, _) )const{ \
- return this->derived().impl( \
- BOOST_ASSIGN_V2_ARG_LIST(SeqU, _) \
- ); \
- } \
+ template<BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)>\
+ typename ::boost::mpl::apply1<\
+ F,\
+ ::boost::mpl::vector<BOOST_ASSIGN_V2_TPL_ARG_LIST(SeqU)>\
+ >::type\
+ operator()( BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, 0) )const{\
+ return this->derived().impl(\
+ BOOST_ASSIGN_V2_ARG_LIST(SeqU, 0)\
+ );\
+ }\
 /**/
 
 #define BOOST_ASSIGN_V2_MACRO2(z, n, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT(\
     BOOST_ASSIGN_V2_MACRO1, \
- BOOST_PP_SEQ_FIRST_N(BOOST_PP_INC(n), BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST)\
+ BOOST_PP_SEQ_FIRST_N(\
+ BOOST_PP_INC(n),\
+ BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST\
+ )\
 ) \
 /**/
 
 BOOST_PP_REPEAT(
- BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY,
+ BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY,
     BOOST_ASSIGN_V2_MACRO2,
     ~
 )
@@ -126,8 +129,8 @@
 /**/
 
 BOOST_PP_REPEAT_FROM_TO(
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY),
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
     BOOST_ASSIGN_V2_MACRO,
     ~
 )

Modified: sandbox/assign_v2/boost/assign/v2/support/functor/pair.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/functor/pair.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/functor/pair.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -14,7 +14,7 @@
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <utility>
 #else
-#include <boost/assign/v2/support/config/limit_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
 #include <boost/assign/v2/support/functor/crtp_unary_and_up.hpp>
 #include <boost/mpl/always.hpp>
 #include <boost/preprocessor/arithmetic.hpp>
@@ -67,7 +67,7 @@
 
         using super_::operator();
 
- T impl()const;// leave un-implemented
+ T impl()const;// leave un-implemented
 
 #define BOOST_ASSIGN_V2_arg(z, I, data) BOOST_PP_CAT(data,BOOST_PP_INC(I))
 #define BOOST_ASSIGN_V2_MACRO(z, N, data) \
@@ -78,7 +78,7 @@
 /**/
 BOOST_PP_REPEAT_FROM_TO(
     1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
     BOOST_ASSIGN_V2_MACRO,
     ~
 )

Modified: sandbox/assign_v2/boost/assign/v2/support/functor/value.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/functor/value.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/functor/value.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -15,7 +15,7 @@
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 #include <utility>
 #else
-#include <boost/assign/v2/support/config/limit_arity.hpp>
+#include <boost/assign/v2/support/config/limit_functor_arity.hpp>
 #include <boost/assign/v2/support/functor/crtp_unary_and_up.hpp>
 #include <boost/mpl/always.hpp>
 #include <boost/preprocessor/arithmetic.hpp>
@@ -28,7 +28,7 @@
 //syntax_detail_functor_value
 namespace functor_aux{
 
- template<typename T = nil_>
+ template<typename T = kwd_nil_>
     class value/*<-*/
 #if !BOOST_ASSIGN_V2_ENABLE_CPP0X
     : public functor_aux::crtp_unary_and_up<
@@ -57,10 +57,11 @@
 //<-
 
 #else
-
         protected:
- typedef ::boost::mpl::always<T> meta_result_;
- typedef functor_aux::crtp_unary_and_up<this_, meta_result_> super_;
+ typedef ::boost::mpl::always<T> meta_result_;
+ typedef functor_aux::crtp_unary_and_up<
+ this_, meta_result_
+ > super_;
 
         public:
 
@@ -75,7 +76,7 @@
 /**/
 BOOST_PP_REPEAT_FROM_TO(
     1,
- BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_ARITY),
+ BOOST_PP_INC(BOOST_ASSIGN_V2_LIMIT_FUNCTOR_ARITY),
     BOOST_ASSIGN_V2_MACRO,
     ~
 )

Modified: sandbox/assign_v2/boost/assign/v2/support/keyword.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/keyword.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/keyword.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -17,8 +17,8 @@
 //[syntax_detail_keyword
 namespace keyword_aux{
 
- struct ignore{
- ignore(){}
+ struct ignore{
+ ignore(){}
         template<typename Anything> ignore(Anything){}
     };
     struct element/*<-*/{}/*->*/;
@@ -30,21 +30,21 @@
 
 }//keyword_aux
 
- typedef keyword_aux::ignore ignore_;
- typedef keyword_aux::element element_;
- typedef keyword_aux::key key_;
- typedef keyword_aux::map map_;
- typedef keyword_aux::nil nil_;
- typedef keyword_aux::use_default use_default_;
- typedef keyword_aux::value value_;
+ typedef keyword_aux::ignore kwd_ignore_;
+ typedef keyword_aux::element kwd_element_;
+ typedef keyword_aux::key kwd_key_;
+ typedef keyword_aux::map kwd_map_;
+ typedef keyword_aux::nil kwd_nil_;
+ typedef keyword_aux::use_default kwd_use_default_;
+ typedef keyword_aux::value kwd_value_;
 /*<-*/namespace{/*->*/
- const ignore_ _ignore/*<-*/ = ignore_()/*->*/;
- const element_ _element/*<-*/ = {}/*->*/;
- const key_ _key/*<-*/ = {}/*->*/;
- const map_ _map/*<-*/ = {}/*->*/;
- const nil_ _nil/*<-*/ = {}/*->*/;
- const use_default_ _use_default/*<-*/ = {}/*->*/;
- const value_ _value/*<-*/ = {}/*->*/;
+ const kwd_ignore_ _ignore/*<-*/ = kwd_ignore_()/*->*/;
+ const kwd_element_ _element/*<-*/ = {}/*->*/;
+ const kwd_key_ _key/*<-*/ = {}/*->*/;
+ const kwd_map_ _map/*<-*/ = {}/*->*/;
+ const kwd_nil_ _nil/*<-*/ = {}/*->*/;
+ const kwd_use_default_ _use_default/*<-*/ = {}/*->*/;
+ const kwd_value_ _value/*<-*/ = {}/*->*/;
 
 /*<-*/}/*->*/
 //]

Modified: sandbox/assign_v2/boost/assign/v2/support/pp/parameter_list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/pp/parameter_list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/pp/parameter_list.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,27 +9,119 @@
 ////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PAREMETER_LIST_ER_2011_HPP
 #define BOOST_ASSIGN_V2_PAREMETER_LIST_ER_2011_HPP
+#include <boost/preprocessor/arithmetic.hpp>
 #include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/comma_if.hpp>
+#include <boost/preprocessor/control.hpp>
+#include <boost/preprocessor/punctuation.hpp>
 #include <boost/preprocessor/repetition.hpp>
 #include <boost/preprocessor/seq.hpp>
-#include <boost/preprocessor/tuple/to_seq.hpp>
-#define BOOST_ASSIGN_V2_BOOST_ASSIGN_V2_PARAMETER_LIST_iter(r, data, i, U) \
- BOOST_PP_COMMA_IF(i) \
- U & \
- BOOST_PP_CAT(data, i) \
+
+#define BOOST_ASSIGN_V2_ARG_LIST_ITER( z, n, shift )\
+ BOOST_PP_CAT(\
+ _,\
+ BOOST_PP_ADD(\
+ shift,\
+ n\
+ )\
+ )\
 /**/
-#define BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, data) \
- BOOST_PP_SEQ_FOR_EACH_I(BOOST_ASSIGN_V2_BOOST_ASSIGN_V2_PARAMETER_LIST_iter, data, SeqU) \
+
+#define BOOST_ASSIGN_V2_PARAMETER_LIST_ITER( r, shift, i, U )\
+ BOOST_PP_COMMA_IF(i)\
+ U &\
+ BOOST_ASSIGN_V2_ARG_LIST_ITER(~, i, shift)\
 /**/
-#define BOOST_ASSIGN_V2_ARG_LIST(SeqU, data) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(SeqU), data)
+
+#define BOOST_ASSIGN_V2_PARAMETER_LIST(SeqU, shift)\
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_ASSIGN_V2_PARAMETER_LIST_ITER, shift, SeqU)\
 /**/
-#define BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU) BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(SeqU), typename T)
+
+#define BOOST_ASSIGN_V2_ARG_LIST(SeqU, shift)\
+ BOOST_PP_ENUM(\
+ BOOST_PP_SEQ_SIZE(SeqU),\
+ BOOST_ASSIGN_V2_ARG_LIST_ITER,\
+ shift\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_TPL_PARAMETER_LIST(SeqU)\
+ BOOST_PP_ENUM_PARAMS(\
+ BOOST_PP_SEQ_SIZE(SeqU),\
+ typename T\
+ )\
+/**/
+
 #define BOOST_ASSIGN_V2_TPL_ARG_LIST(SeqU) BOOST_PP_SEQ_ENUM(SeqU)
 //[parameter_list_size
-/*Non-override-able constant supporting the definition of functor overloads*/
-#define BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE 10
+// Non-override-able constant supporting the definition of functor overloads
+// under C++03
+#define BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE 100
 //]
-#define BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST BOOST_PP_TUPLE_TO_SEQ(BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE,((T0 const)(T0),(T1 const)(T1),(T2 const)(T2),(T3 const)(T3),(T4 const)(T4),(T5 const)(T5),(T6 const)(T6),(T7 const)(T7),(T8 const)(T8),(T9 const)(T9)))
+
+#define BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST_ITER(z, n, data)\
+ (\
+ ( BOOST_PP_CAT(T, n) const)( BOOST_PP_CAT(T, n) )\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST\
+ BOOST_PP_REPEAT(\
+ BOOST_ASSIGN_V2_PARAMETER_LIST_SIZE,\
+ BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST_ITER,\
+ ~\
+ )\
+/**/
+
+// CSV
+
+// PARAMETER_LIST
+
+#define BOOST_ASSIGN_V2_CSV_PARAMETER_LIST_ITER(z, n, SeqU)\
+ BOOST_ASSIGN_V2_PARAMETER_LIST(\
+ SeqU,\
+ BOOST_PP_MUL(\
+ n,\
+ BOOST_PP_SEQ_SIZE(SeqU)\
+ )\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_PARAMETER_LIST(SeqU, N)\
+ BOOST_PP_ENUM(\
+ N,\
+ BOOST_ASSIGN_V2_CSV_PARAMETER_LIST_ITER,\
+ SeqU\
+ )\
+/**/
+
+// ARG_LIST
+
+#define BOOST_ASSIGN_V2_CSV_ARG_LIST_ITER(z, i, N)\
+ BOOST_PP_CAT(\
+ _,\
+ BOOST_PP_ADD( N, i)\
+ )\
+/**/
+
+// MISC
+
+#define BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ BOOST_PP_SEQ_FIRST_N(\
+ I,\
+ BOOST_ASSIGN_V2_SEQ_TPL_BINARY_ARG_LIST\
+ )\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_SEQ_ELEM(r, data, elem)\
+ (BOOST_PP_SEQ_ELEM(data, elem))\
+/**/
+
+#define BOOST_ASSIGN_V2_CSV_SEQ2(pos, I)\
+ BOOST_PP_SEQ_FOR_EACH(\
+ BOOST_ASSIGN_V2_CSV_SEQ_ELEM,\
+ pos,\
+ BOOST_ASSIGN_V2_CSV_SEQ1(I)\
+ )\
+/**/
+
 #endif // BOOST_ASSIGN_V2_PAREMETER_LIST_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/support/traits.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/traits.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/traits.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -10,5 +10,6 @@
 #ifndef BOOST_ASSIGN_V2_SUPPORT_TRAITS_ER_2011_HPP
 #define BOOST_ASSIGN_V2_SUPPORT_TRAITS_ER_2011_HPP
 #include <boost/assign/v2/support/traits/container.hpp>
+#include <boost/assign/v2/support/traits/type.hpp>
 
 #endif // BOOST_ASSIGN_V2_SUPPORT_TRAITS_ER_2011_HPP

Modified: sandbox/assign_v2/boost/assign/v2/support/traits/container.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/support/traits/container.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/support/traits/container.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -42,18 +42,26 @@
 // ACCESS
 
     template<typename C>
- struct key : through_value_container<value_key, C>{};
+ struct key
+ : through_value_container<value_key, C>
+ {};
 
     template<typename C>
- struct mapped : through_value_container<value_mapped, C>{};
+ struct mapped
+ : through_value_container<value_mapped, C>
+ {};
 
     template<typename C>
- struct value : through_value_container<value_value, C>{};
+ struct value
+ : through_value_container<value_value, C>
+ {};
 
     template<
         typename C // Multi-array
>
- struct element : through_value_container<value_element, C>{};
+ struct element
+ : through_value_container<value_element, C>
+ {};
 
 // PREDICATE
 
@@ -67,25 +75,25 @@
     {};
 
     template<typename C>
- struct is_associative
+ struct is_associative
         : through_value_container<value_is_associative, C>
     {};
 
     template<typename C>
- struct is_fifo
+ struct is_fifo
         : through_value_container<value_is_fifo, C>
     {};
-
+
     template<typename C>
- struct is_lifo
+ struct is_lifo
         : through_value_container<value_is_lifo, C>
     {};
-
- template<typename C> struct is_map
+
+ template<typename C> struct is_map
         : through_value_container<value_is_map, C>
     {};
-
- template<typename C> struct is_multi_array
+
+ template<typename C> struct is_multi_array
         : through_value_container<value_is_multi_array, C>
     {};
 
@@ -95,7 +103,7 @@
>{};
 
     template<typename C>
- struct is_sorted
+ struct is_sorted
         : through_value_container<value_is_sorted, C>
     {};
 

Modified: sandbox/assign_v2/boost/assign/v2/temporary/variadic_args_to_indices.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/temporary/variadic_args_to_indices.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/temporary/variadic_args_to_indices.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,52 +1,2 @@
-#ifndef BOOST_MPL_DETAIL_VARIADIC_ARGS_TO_INDICES_HPP_ER_2010
-#define BOOST_MPL_DETAIL_VARIADIC_ARGS_TO_INDICES_HPP_ER_2010
+// TODO remove file
 
-// Provided temporarily, until /variadic_template/package_range_c.hpp by
-// Larry Evans is fully supported in the release.
-// Source : http://groups.google.com/group/comp.lang.c++/browse_thread/thread/b21c20c4312c383f/3b842a03167f5bd9#3b842a03167f5bd9
-
-namespace boost{
-namespace mpl{
-namespace er2010{
-
-template<typename I, I...Values> struct indices{};
-
-namespace impl{
-
-template<typename ...Args> struct pack_holder{};
-
-template<typename Indices, typename Pack> struct args_to_indices{};
-
-template<typename I, I...Tail, typename T, typename... Rest>
-struct args_to_indices<
- indices<I, Tail...>,
- impl::pack_holder<T, Rest...>
->
-{
- typedef typename impl::args_to_indices<
- indices<I, Tail..., sizeof...(Tail)>,
- pack_holder<Rest...>
- >::type type;
-};
-
-template<typename I, I...Tail>
-struct args_to_indices<
- indices<I, Tail...>,
- pack_holder<>
->{
- typedef indices<I, Tail...> type;
-};
-
-}// impl
-
-template<typename I, typename...Args>
-struct args_to_indices : impl::args_to_indices<
- indices<I>,
- impl::pack_holder<Args...>
->{};
-
-}// er2010
-}// mpl
-}// boost
-
-#endif // BOOST_MPL_DETAIL_VARIADIC_ARGS_TO_INDICES_HPP_ER_2010

Modified: sandbox/assign_v2/boost/assign/v2/temporary/variadic_sequence.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/temporary/variadic_sequence.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/temporary/variadic_sequence.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,65 +1 @@
-////////////////////////////////////////////////////////////////////////////
-// variadic_sequence.hpp //
-// //
-// Copyright (C) 2011 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 BOOST_MPL_DETAIL_VARIADIC_SEQUENCE_HPP_ER_2010
-#define BOOST_MPL_DETAIL_VARIADIC_SEQUENCE_HPP_ER_2010
-#include <boost/preprocessor/repetition/enum.hpp>
-
-namespace boost{
-namespace mpl{
-namespace detail{
-namespace variadic_sequence_aux{
-
-// Source : http://stackoverflow.com/questions/2709315/is-boost-tuple-compatible-with-c0x-variadic-templates
-
-template <std::size_t, typename, typename...> struct nth_arg;
-
-template <std::size_t N, typename Void, typename T, typename... Args>
-struct nth_arg<N, Void, T, Args...>
-{
- typedef typename nth_arg<N - 1, Void, Args...>::type type;
-};
-
-template <typename Void, typename T, typename... Args>
-struct nth_arg<0, Void, T, Args...>
-{
- typedef T type;
-};
-
-template <std::size_t N, typename Void>
-struct nth_arg<N, Void>
-{
- typedef Void type;
-};
-
-}// variadic_sequence_aux
-}// detail
-}// mpl
-}// boost
-
-#define BOOST_MPL_DETAIL_VARIADIC_SEQUENCE_arg(z, n, data) \
- typename ::boost::mpl::detail::variadic_sequence_aux::nth_arg< \
- n, data, Args...\
- >::type \
-/**/
-
-#define BOOST_MPL_DETAIL_VARIADIC_SEQUENCE(N, FROM, TO, default_type) \
-template <typename ...Args> \
-struct TO \
-{ \
- typedef FROM< \
- BOOST_PP_ENUM( \
- N, \
- BOOST_MPL_DETAIL_VARIADIC_SEQUENCE_arg, \
- default_type \
- ) \
- > type; \
-}; \
-/**/
-
-#endif // BOOST_MPL_DETAIL_VARIADIC_SEQUENCE_HPP_ER_2010
+// TODO remove file

Modified: sandbox/assign_v2/boost/assign/v2/temporary/variadic_vector.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/temporary/variadic_vector.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/temporary/variadic_vector.hpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -1,30 +1 @@
-////////////////////////////////////////////////////////////////////////////
-// variadic_sequence.hpp //
-// //
-// Copyright (C) 2011 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 BOOST_MPL_DETAIL_VARIADIC_VECTOR_HPP_ER_2010
-#define BOOST_MPL_DETAIL_VARIADIC_VECTOR_HPP_ER_2010
-#include <boost/mpl/vector.hpp>
-#include <boost/mpl/aux_/na.hpp>
-#include <boost/assign/v2/temporary/variadic_sequence.hpp>
-
-namespace boost{
-namespace mpl{
-namespace detail{
-
-BOOST_MPL_DETAIL_VARIADIC_SEQUENCE(
- BOOST_MPL_LIMIT_VECTOR_SIZE,
- ::boost::mpl::vector,
- variadic_vector,
- ::boost::mpl::na
-)
-
-}// detail
-}// mpl
-}// boost
-
-#endif // BOOST_MPL_DETAIL_VARIADIC_VECTOR_HPP_ER_2010
+// TODO remove file

Modified: sandbox/assign_v2/libs/assign/v2/src/main.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/src/main.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/src/main.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -28,9 +28,9 @@
     // Do not put libs/assign/v2/test/unit_testing in this project
     {
         boost::format f( "boost version %1%.%2% %3% " );
- f
- % ( BOOST_VERSION / 100000 )
- % ( (BOOST_VERSION / 100) % 1000)
+ f
+ % ( BOOST_VERSION / 100000 )
+ % ( (BOOST_VERSION / 100) % 1000)
                     % ( BOOST_VERSION % 100 );
         std::cout << f.str() << std::endl;
     }
@@ -71,9 +71,9 @@
         xxx_option::test();
         xxx_put::test();
         xxx_ref::test();
- }
+ }
     {
- tutorial_assign_v2::run();
+ //tutorial_assign_v2::run();
     }
     {/*
         using namespace speed_assign_v2;

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -13,8 +13,8 @@
 #include <string>
 #include <boost/assign/v2/include/ref/csv_array.hpp>
 #include <boost/assign/v2/include/csv_deque.hpp>
+#include <boost/assign/v2/include/chain.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>
@@ -39,13 +39,13 @@
         }
         // Non-Boost.Assign.v2 containers
         {
- //[test_chain_read
+ //[test_chain1
             typedef std::string T;
- std::vector<T> word;
+ std::vector<T> word;
 
- boost::copy(
- as2::csv_deque( "O", "R" ) | as2::_chain( as2::csv_deque( "B", "I", "T" ) ),
- std::back_inserter( word )
+ boost::copy(
+ as2::csv_deque( "O", "R" ) | as2::_chain( as2::csv_deque( "B", "I", "T" ) ),
+ std::back_inserter( word )
             );
 
             BOOST_ASSIGN_V2_CHECK(
@@ -54,42 +54,42 @@
             //]
         }
         {
- //[test_chain_write
+ //[test_chain2
             typedef int T; boost::array<T, 3> head; std::list<T> tail( 2 );
-
- boost::copy(
+
+ boost::copy(
                 as2::csv_deque( 1, 2, 3, 4, 5 ),
- boost::begin( head | as2::_chain( tail ) )
+ boost::begin( head | as2::_chain( tail ) )
             );
 
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( head, as2::csv_deque( 1, 2, 3 ) )
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal( head, as2::csv_deque( 1, 2, 3 ) )
             );
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( tail, as2::csv_deque( 4, 5 ) )
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal( tail, as2::csv_deque( 4, 5 ) )
             );
             //]
         }
         // Boost.Assign.v2 containers
- {
- //[test_chain_write_refs
+ {
+ //[test_chain3
             std::vector<int> source( 8 ); boost::iota(source, 1);
             boost::array<int, 4> head; int t, a, i, l;
-
+
             /*<<Brings `&&` to scope>>*/using namespace boost::assign::v2;
             boost::copy(
                 source,
- boost::begin(
- head && (/*<< rvalue! >>*/ as2::ref::csv_array( t, a, i, l ) | as2::ref::_get )
+ boost::begin(
+ head && (/*<< rvalue! >>*/ as2::ref::csv_array( t, a, i, l ) | as2::ref::_get )
                 )
             );
 
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( head, as2::csv_deque( 1, 2, 3, 4 ) )
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal( head, as2::csv_deque( 1, 2, 3, 4 ) )
             );
- BOOST_ASSIGN_V2_CHECK( t == 5 );
- BOOST_ASSIGN_V2_CHECK( a == 6 );
- BOOST_ASSIGN_V2_CHECK( i == 7 );
+ 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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,14 +9,14 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <vector>
 #include <stack>
-#include <boost/array.hpp>
-#include <boost/assign/v2/support/check/equal_container.hpp>
-#include <boost/assign/v2/support/config/check.hpp>
+#include <boost/assign/v2/conversion/check.hpp>
 #include <boost/assign/v2/include/convert.hpp>
 #include <boost/assign/v2/include/converter.hpp>
-#include <boost/assign/v2/conversion/check.hpp>
+#include <boost/assign/v2/include/csv_deque.hpp>
 #include <boost/assign/v2/ref/array.hpp>
-#include <boost/assign/v2/deque.hpp>
+#include <boost/assign/v2/support/check/equal_container.hpp>
+#include <boost/assign/v2/support/config/check.hpp>
+#include <boost/assign/v2/support/pp/ignore.hpp>
 #include <boost/multi_array.hpp>
 #include <boost/range/algorithm/equal.hpp>
 #include <boost/range/algorithm_ext/iota.hpp>
@@ -29,12 +29,12 @@
     // suggested by JB:
     //[test_conversion_f
     template<typename C, typename R>
- void f(C cont, R const& r){
+ void f(C cont, R const& r)/*<-*/{
         namespace as2 = boost::assign::v2;
         as2::check_aux::equal_container( cont, r );
- }
+ }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
     //]
-
+
     void test()
     {
         namespace as2 = boost::assign::v2;
@@ -42,90 +42,72 @@
 
         // External containers (fully qualified)
         {
- //[test_convert
+ //[test_convert1
             typedef std::stack<int> C;
-
+
             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_converter
+ //[test_converter1
             std::list<int> source( 3 ); boost::iota( source, 1 );
-
+
             std::queue<int> fifo = as2::converter( source );
-
- BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
+
+ BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 3 );
             //]
         }
         {
- //[test_converter_f
+ //[test_converter2
             typedef int T; typedef std::vector<T> R;
- R benchmark( 10 ); boost::iota( benchmark, 0 );
-
+ R benchmark( 10 ); boost::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 boost::array<int, sz> row_;
-
- as2::convert<row_> as_row;
- 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 )
- ( as2::ref::csv_array( 7, 8, 9 ) | as_row )
- );
-
- for(int i = 0; i < 9; i++)
- {
- BOOST_ASSIGN_V2_CHECK( matrix3x3[ i / 3 ][ i % 3 ] == i + 1 );
- }
- //]
- }
         // Boost.Assign.2.0 containers - name lookup
         {
- //[test_converter_multi_array
+ //[test_converter3
             typedef boost::multi_array<int, 2> array2_;
             typedef array2_::size_type size_;
             typedef size_ const dim_;
             dim_ dim1 = 3, dim2 = 3;
- array2_ array2 = converter(
+ array2_ array2 = converter(
                 as2::csv_deque(-1, +1, -1, +1, -1, +1, -1, +1, -1),
                 boost::extents[dim1][dim2]
             );
-
+
             const int benchmark [] = {
                 -1, +1, -1,
                 +1, -1, +1,

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -7,138 +7,16 @@
 // 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 <string>
-#include <utility>
-#include <boost/array.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/assign/v2/support/config/check.hpp>
-#include <boost/assign/v2/deque/conversion.hpp>
-#include <boost/assign/v2/include/csv_deque.hpp>
-#include <boost/assign/v2/include/deque.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <libs/assign/v2/test/deque.h>
+#include <libs/assign/v2/test/deque/csv_deque.h>
+#include <libs/assign/v2/test/deque/deque.h>
 
 namespace test_assign_v2{
 namespace xxx_deque{
 
     void test()
     {
- namespace as2 = boost::assign::v2;
- {
- //[test_deque_str_literal
- typedef as2::result_of::deque<char*>::type C;
-
- C deque = as2::deque<char*>( "x" )( "y" )( "z" );
-
- std::deque<std::string> benchmark;
- benchmark.push_back( "x" );
- benchmark.push_back( "y" );
- benchmark.push_back( "z" );
-
- BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque ) );
- //]
- }
- {
- //[test_deque_variadic
- typedef std::string word_;
- const char x[] = "foo";
- const char y[4] = { 'b', 'a', 'r', '\0' };
- word_ z = "***baz";
-
- std::deque<word_> benchmark;
- benchmark.push_back( word_( x, 3 ) );
- benchmark.push_back( word_( y ) );
- benchmark.push_back( word_( z, 3, 3 ) );
- benchmark.push_back( word_( "qux" ) );
-
- typedef as2::result_of::deque<word_>::type C;
- C cont1 = as2::deque<word_>( as2::_nil );
-
- BOOST_ASSIGN_V2_CHECK( cont1.empty() );
-
- cont1( x, 3 )( y )( z, 3, 3 )( "qux" );
-
- 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( boost::range::equal( benchmark, cont2 ) );
- //]
- }
- {
- //[test_csv_deque_str_literal
- typedef as2::result_of::csv_deque<const char[2]>::type C1;
- typedef as2::result_of::csv_deque<std::string>::type C2;
-
- BOOST_MPL_ASSERT(( boost::is_same<C1, as2::result_of::deque<char*>::type> ));
- BOOST_MPL_ASSERT(( boost::is_same<C2, as2::result_of::deque<std::string>::type> ));
-
- C1 deque1 = as2::csv_deque( "x", "y", "z" );
- C2 deque2 = as2::csv_deque<std::string>( "x", "y", "z" );
-
- std::deque<std::string> benchmark;
- benchmark.push_back( "x" );
- benchmark.push_back( "y" );
- benchmark.push_back( "z" );
-
- BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque1 ) );
- BOOST_ASSIGN_V2_CHECK( boost::range::equal( benchmark, deque2 ) );
- //]
- }
- {
- //[test_csv_deque_str
- typedef std::string T;
- typedef as2::result_of::csv_deque<T>::type C;
-
- BOOST_MPL_ASSERT(( boost::is_same<C, as2::result_of::deque<std::string>::type> ));
-
- C deque = as2::csv_deque<T>( "x", "y", "z" );
-
- std::deque<std::string> benchmark;
- benchmark.push_back( "x" );
- benchmark.push_back( "y" );
- benchmark.push_back( "z" );
-
- 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(( boost::is_same<C, as2::result_of::deque<int>::type> ));
-
- C series1 = as2::csv_deque( 0, 1, 1, 2, 3, 5, 8 );
-
- std::deque<int> benchmark;
- benchmark.push_back( 0 );
- benchmark.push_back( 1 );
- benchmark.push_back( 1 );
- benchmark.push_back( 2 );
- benchmark.push_back( 3 );
- benchmark.push_back( 5 );
- benchmark.push_back( 8 );
-
- 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( boost::range::equal( benchmark, series2 ) );
- //]
- }
- {
- //[test_csv_deque_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(
- boost::range::equal( ar, as2::csv_deque( 1, 2, 3, 4, 5 ) )
- );
- //]
- }
+ xxx_deque::test();
+ xxx_csv_deque::test();
     }
 
 }// xxx_deque

Modified: sandbox/assign_v2/libs/assign/v2/test/option.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -26,7 +26,7 @@
         xxx_list::test();
         xxx_repeat::test();
         xxx_row_major::test();
- xxx_standard::test();
+ xxx_std_modifier::test();
     }
 
 }// xxx_option

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -13,11 +13,11 @@
 #include <map>
 #include <vector>
 #include <boost/array.hpp>
-#include <boost/assign/v2/support/config/check.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/assign/v2/option/data.hpp>
-#include <boost/assign/v2/include/csv_put.hpp>
 #include <boost/assign/v2/include/put.hpp>
+#include <boost/assign/v2/support/config/check.hpp>
+
 #include <boost/function.hpp>
 #include <boost/lambda/bind.hpp>
 #include <boost/lambda/lambda.hpp>
@@ -35,13 +35,18 @@
         namespace as2 = boost::assign::v2;
         {
             // (*fp) resolves error C2440 using MSVC
- //[test_option_data_math
+ //[test_data1
             std::vector<double> exponent;
             /*<-*/typedef double(*fp)(double);/*->*/
             typedef boost::function<double(double)> f_;
- as2::csv_put(
- exponent
- , as2::_option % ( as2::_data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ ) )
+
+ BOOST_AUTO(
+ _data,
+ ( as2::_data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ ) )
+ );
+
+ csv(
+ as2::put( exponent ) % _data
                 , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
 
@@ -51,13 +56,22 @@
             //]
         }
         {
- //[test_option_data_recursive
+ //[test_data2
             int k = 1;
 
+ BOOST_AUTO(
+ _data,
+ (
+ as2::_data = (
+ boost::lambda::var( k ) *= boost::lambda::_1
+ )
+ )
+ );
+
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
- as2::csv_deque(
- as2::_option % ( as2::_data = ( boost::lambda::var( k ) *= boost::lambda::_1 ) ),
+ as2::csv(
+ as2::deque<int>( as2::_nil ) % _data,
                         1, 2, 3, 4, 5
                     ),
                     as2::csv_deque( 1, 2, 6, 24, 120 )
@@ -66,24 +80,24 @@
             //]
         }
         {
- //[test_option_data_value
- typedef std::string word_;
- const char x[] = "foo";
- const char y[4] = { 'b', 'a', 'r', '\0' };
- word_ z = "***baz";
- typedef std::map<int, word_> C;
- typedef C::value_type T;
- typedef C::mapped_type D;
- C map;
- (
- as2::put( map ) % ( as2::_data = as2::_value )
- )( 1, D( x, 3 ) )( 2, y )( 3, D( z, 3, 3 ) )( 4, "qux");
+ //[test_data3
+ typedef std::string month_; typedef int days_;
+ typedef std::map<month_, days_> map_;
+ typedef map_::value_type pair_;
+
+ map_ map;
+ as2::csv_put<as2::value_>(
+ map,
+ pair_( "jan", 31 ),
+ pair_( "feb", 28 ),
+ pair_( "mar", 31 )
+ );
 
- BOOST_ASSIGN_V2_CHECK( map[1] == "foo" ); BOOST_ASSIGN_V2_CHECK( map[2] == "bar" );
- BOOST_ASSIGN_V2_CHECK( map[3] == "baz" ); BOOST_ASSIGN_V2_CHECK( map[4] == "qux" );
+ BOOST_ASSIGN_V2_CHECK( map["jan"] == 31 );
+ BOOST_ASSIGN_V2_CHECK( map["feb"] == 28 );
+ BOOST_ASSIGN_V2_CHECK( map["mar"] == 31 );
             //]
         }
-
     }
 
 }// xxx_data

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,10 +9,9 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <list>
 #include <boost/array.hpp>
-#include <boost/assign/v2/support/config/check.hpp>
 #include <boost/assign/v2/deque.hpp>
-#include <boost/assign/v2/option/modifier/iterate.hpp>
 #include <boost/assign/v2/include/csv_put.hpp>
+#include <boost/assign/v2/support/config/check.hpp>
 #include <boost/lambda/lambda.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/mpl/apply.hpp>
@@ -21,8 +20,6 @@
 #include <boost/typeof/typeof.hpp>
 #include <libs/assign/v2/test/option/iterate.h>
 
-#include <iostream>
-
 namespace test_assign_v2{
 namespace xxx_option{
 namespace xxx_iterate{
@@ -31,7 +28,6 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[test_option_iterate_meta
             typedef as2::functor_aux::iterate arg_;
             typedef boost::array<int, 4> cont_;
             typedef as2::result_of::put<cont_>::type put_;
@@ -40,30 +36,30 @@
             typedef as2::interpreter_aux::replace_modifier_tag<put_> meta2_;
             typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
             BOOST_MPL_ASSERT(( boost::is_same<result1_, result2_> ));
- //]
         }
         {
- //[test_option_iterate_shifted
- typedef int T; boost::array<T, 10> seq;
- seq[0] = 1; seq[1] = 2; seq[2] = 3;
+ //[test_iterate1
+ typedef int T; boost::array<T, 10> cont;
+ cont[0] = 1; cont[1] = 2; cont[2] = 3;
 
             int index = 3;
- as2::csv_put(
- seq
- , as2::_option % ( as2::_iterate = boost::lambda::var( index )++ )
- , 4, 5, 6, 7, 8, 9, 10
+ BOOST_AUTO(
+ _modifier,
+ ( as2::_iterate = boost::lambda::var( index )++ )
             );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
- seq,
+ csv(
+ as2::put( cont ) % _modifier
+ , 4, 5, 6, 7, 8, 9, 10
+ ).container(),
                     as2::csv_deque( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )
                 )
             );
             //]
         }
         {
- //[test_option_iterate_meta_deque
             typedef as2:: interpreter_aux::keyword_iterate keyword_;
             typedef as2::functor_aux::iterate arg_;
             typedef as2::result_of::deque<int>::type put_;
@@ -72,24 +68,24 @@
             typedef as2:: interpreter_aux::replace_modifier_tag<put_> meta2_;
             typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
             BOOST_MPL_ASSERT(( boost::is_same<result1_, result2_> ));
- //]
         }
         {
- //[test_option_iterate_shifted_deque
- as2::result_of::csv_deque<int>::type tmp = as2::csv_deque<int>
- ( 1, 2, 3, as2::as_arg_list( std::list<int>( 7 ) ) );
+ //[test_iterate2
+ typedef as2::result_of::csv_deque<int>::type interpreter_;
+ interpreter_ interpreter = as2::csv_deque<int>
+ ( 1, 2, 3 ).for_each( std::list<int>( 7 ) );
 
             int index = 3;
             BOOST_AUTO(
- seq,
- (
- tmp % ( as2::_iterate = boost::lambda::var( index )++ )
- )( 4 )( 5 )( 6 )( 7 )( 8 )( 9 )( 10 )
+ _modifier,
+ ( as2::_iterate = boost::lambda::var( index )++ )
             );
-
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
- alternating,
+ csv(
+ interpreter % _modifier,
+ 4, 5, 6, 7, 8, 9, 10
+ ).container(),
                     as2::csv_deque( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 )
                 )
             );

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -12,6 +12,7 @@
 #include <cmath>
 #include <list>
 #include <boost/assign/v2/support/config/check.hpp>
+#include <boost/assign/v2/include/csv.hpp>
 #include <boost/assign/v2/include/put.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/assign/v2/option/data.hpp>
@@ -34,21 +35,32 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[test_option_mapped_map
+ //[test_mapped1
             typedef std::string month_; typedef int days_;
             typedef std::map<month_, days_> C; C year;
- (
- as2::put( year )
- ( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )
- % ( as2::_data = as2::_key ) % ( as2::_mapped = boost::lambda::constant( 31 ) )
- )/*<<Calls `year[ month_( "jan" ) ] = 31`>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
+
+ as2::csv_put<2>( year, "feb", 28 );
+
+ BOOST_AUTO( _put, ( as2::put<as2::key_, C>( year ) ) );
+
+ csv(
+ _put % ( as2::_mapped = boost::lambda::constant( 30 ) )
+ , "apr", "jun", "sep", "nov"
+ );
+
+ BOOST_ASSIGN_V2_CHECK( year["apr"] == 30 );
+ BOOST_ASSIGN_V2_CHECK( year["nov"] == 30 );
+
+ csv(
+ _put % ( as2::_mapped = boost::lambda::constant( 31 ) )
+ , "jan", "mar", "may", "jul", "aug", "oct", "dec"
+ );
 
             BOOST_ASSIGN_V2_CHECK( year["jan"] == 31 );
             BOOST_ASSIGN_V2_CHECK( year["dec"] == 31 );
             //]
         }
         {
- //[test_option_mapped_meta_deque
             typedef BOOST_TYPEOF(boost::lambda::_1) arg_;
             typedef as2:: interpreter_aux::keyword_mapped keyword_;
             typedef as2::result_of::deque<int>::type put_;
@@ -57,19 +69,22 @@
             typedef as2:: interpreter_aux::replace_modifier_tag<put_> meta2_;
             typedef ::boost::mpl::apply1<meta2_, tag1_>::type result2_;
             BOOST_MPL_ASSERT((boost::is_same<result1_, result2_>));
- //]
         }
         {
- //[test_option_mapped_deque
+ //[test_mapped2
             std::list<int> source(10, 1); boost::iota( source, 1 );
- BOOST_AUTO( option, ( as2::_mapped = ( boost::lambda::_1 *= -1 ) ) );
+ BOOST_AUTO(
+ _modifier,
+ ( as2::_mapped = ( boost::lambda::_1 *= -1 ) )
+ );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
- (
- as2::deque<int>( as2::_nil ).as_arg_list( source )
- % option
- )( 1 )( 3 )( 5 )( 7 )( 9 ),
+ csv(
+ as2::deque<int>( as2::_nil ).for_each( source )
+ % _modifier
+ , 1, 3, 5, 7, 9
+ ),
                     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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -10,7 +10,9 @@
 #include <vector>
 #include <boost/typeof/typeof.hpp>
 #include <boost/assign/v2/support/config/check.hpp>
-#include <boost/assign/v2/include/csv_put.hpp>
+#include <boost/assign/v2/include/csv.hpp>
+#include <boost/assign/v2/include/put.hpp>
+#include <boost/assign/v2/include/delay_put.hpp>
 #include <boost/assign/v2/option/modifier/std.hpp>
 #include <boost/assign/v2/option/modifier/repeat.hpp>
 #include <boost/assign/v2/deque.hpp>
@@ -25,28 +27,33 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[test_option_repeat_simple
+ //[test_repeat1
             std::vector<int> cont;
- as2::csv_put( cont, as2::_option % ( as2::_repeat = 2 ) , 1, 10, 100 );
 
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- cont,
- as2::csv_deque( 1, 1, 10, 10, 100, 100 )
- )
+ BOOST_AUTO( _modifier, ( as2::_repeat = 2 ) );
+
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal(
+ cont | (
+ as2::_delay_put % _modifier
+ ).for_each( as2::csv_deque(1, 10, 100) ),
+ as2::csv_deque( 1, 1, 10, 10, 100, 100 )
+ )
             );
             //]
         }
         {
- //[test_option_repeat_compose
- BOOST_AUTO(
- cont, (
- as2::deque<int>( as2::_nil ) % as2::_push_front % ( as2::_repeat = 2 )
- )( 1 )( 10 )( 100 )
- );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( cont, as2::csv_deque( 100, 100, 10, 10, 1, 1 ) )
+ //[test_repeat2
+ BOOST_AUTO( _modifier, ( as2::_repeat = 2 ) );
+
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal(
+ csv(
+ as2::deque<int, as2::push_front_>( as2::_nil) % _modifier
+ , 1, 10, 100, 1000
+ ),
+ as2::csv_deque( 1000, 1000, 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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -9,10 +9,11 @@
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 
-#include <boost/assign/v2/support/config/check.hpp>
-#include <boost/assign/v2/include/csv_put.hpp>
+#include <boost/assign/v2/include/csv.hpp>
+#include <boost/assign/v2/include/put.hpp>
 #include <boost/assign/v2/option/data.hpp>
 #include <boost/assign/v2/option/modifier/row_major.hpp>
+#include <boost/assign/v2/support/config/check.hpp>
 #include <boost/lambda/lambda.hpp>
 #include <boost/multi_array.hpp>
 #include <boost/range/algorithm/equal.hpp>
@@ -20,8 +21,6 @@
 #include <boost/typeof/typeof.hpp>
 #include <libs/assign/v2/test/option/row_major.h>
 
-#include <iostream>
-
 namespace test_assign_v2{
 namespace xxx_option{
 namespace xxx_row_major{
@@ -29,19 +28,23 @@
     void test()
     {
         namespace as2 = boost::assign::v2;
-
- //[test_option_row_major
+
+ //[test_row_major1
         typedef boost::multi_array<int, 2> array2_;
         typedef array2_::size_type size_;
         typedef size_ const dim_;
         dim_ dim1 = 3, dim2 = 3;
         array2_ array2( boost::extents[dim1][dim2] );
 
- int k = -2;
- BOOST_AUTO( option, as2::_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 );
-
+ int k;
+ BOOST_AUTO(
+ _modifier,
+ ( as2::_row_major = ( boost::lambda::var( k ) += 2 ) )
+ );
+ BOOST_AUTO( _put, as2::put( array2 ) % _modifier );
+ k = -2; csv( _put, -1, -1, -1, -1, -1 );
+ k = -1; csv( _put, +1, +1, +1, +1 );
+
         const int benchmark [] = {
             -1, +1, -1,
             +1, -1, +1,

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -14,7 +14,9 @@
 #include <string>
 #include <boost/assign/v2/support/config/check.hpp>
 #include <boost/assign/v2/include/delay_csv_put.hpp>
+#include <boost/assign/v2/include/csv.hpp>
 #include <boost/assign/v2/include/csv_put.hpp>
+#include <boost/assign/v2/include/put.hpp>
 #include <boost/assign/v2/deque.hpp>
 #include <boost/assign/v2/option/modifier/std.hpp>
 #include <boost/circular_buffer.hpp>
@@ -30,7 +32,7 @@
 
 namespace test_assign_v2{
 namespace xxx_option{
-namespace xxx_standard{
+namespace xxx_std_modifier{
 
     void test()
     {
@@ -38,7 +40,6 @@
 
         // PUT
         {
- //[test_option_standard_meta
             typedef as2::result_of::put<std::vector<int> >::type put_;
             typedef as2::modifier_tag::push_front tag_;
             typedef as2::result_of::option_std_modifier<
@@ -50,58 +51,57 @@
             //]
         }
         {
- //[test_option_push_front
- boost::circular_buffer<int> cb( 3 );
-
+ //[test_push_front1
+ boost::circular_buffer<int> cb( 3 );
+
+ as2::csv_put<as2::push_front_>( cb, 3, 2, 1 );
+
             BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- cb | as2::delay_csv_put( as2::_option % as2::_push_front, as2::csv_deque( 3, 2, 1 ) ),
- as2::csv_deque( 1, 2, 3 )
- )
+ boost::range::equal( cb, as2::csv_deque( 1, 2, 3 ) )
             );
 
+ as2::csv_put( cb, 4, 5 );
+
             BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
- as2::csv_deque( 3, 4, 5 )
- )
- );
+ boost::range::equal( cb, as2::csv_deque( 3, 4, 5 ) )
+ );
 
             //]
         }
         {
- //[test_option_push
- // NB: This option is dedundant with the default
- std::queue<int> fifo; as2::csv_put( fifo, as2::_option % as2::_push, 1, 10, 100 );
+ //[test_push1
+ std::queue<int> fifo;
+
+ // Same as default
+ as2::csv_put<as2::push_>( fifo, 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 100 );
             //]
         }
         {
- //[test_option_insert
- // NB: This option is dedundant with the default
- std::set<std::string> letters;
- as2::csv_put( letters, as2::_option % as2::_insert, "d", "a", "c", "b" );
+ //[test_insert1
+ // Same as default
+ std::set<std::string> letters;
+ as2::csv_put<as2::insert_>( letters, "d", "a", "c", "b" );
 
             BOOST_ASSIGN_V2_CHECK( letters.lower_bound( "a" ) == boost::begin( letters ) );
             BOOST_ASSIGN_V2_CHECK( letters.upper_bound( "d" ) == boost::end( letters ) );
             //]
         }
         {
- //[test_option_push_back
- // NB: This option is dedundant with the default
+ //[test_push_back1
+ // Same as default
             std::list<int> list;
- as2::csv_put( list, as2::_option % as2::_push_back, 1, 10, 100 );
+ as2::csv_put<as2::push_back_>( list, 1, 10, 100 );
 
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( list, as2::csv_deque( 1, 10, 100 ) )
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal( list, as2::csv_deque( 1, 10, 100 ) )
             );
             //]
         }
         // DEQUE
         {
- //[test_option_meta_deque
             typedef as2::result_of::deque<int>::type put_;
             typedef as2::modifier_tag::push_front tag_;
             typedef as2::result_of::option_push_front<put_>::type result1_;
@@ -109,22 +109,19 @@
             typedef ::boost::mpl::apply1<meta2_, tag_>::type result2_;
 
             BOOST_MPL_ASSERT(( boost::is_same<result1_, result2_> ));
- //]
         }
         {
- //[test_option_push_front_deque
- BOOST_AUTO(
- two_power_n,
- as2::csv_deque( as2::_option % as2::_push_front, 16, 8, 4, 2, 1 )
- );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal( two_power_n, as2::csv_deque( 1, 2, 4, 8, 16 ) )
+ //[test_push_front2
+ BOOST_ASSIGN_V2_CHECK(
+ boost::range::equal(
+ as2::csv_deque<int, as2::push_front_>( 16, 8, 4, 2, 1 ),
+ as2::csv_deque( 1, 2, 4, 8, 16 )
+ )
             );
             //]
         }
     }
 
-}// xxx_standard
+}// xxx_std_modifier
 }// xxx_option
 }// test_assign_v2

Modified: sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.h 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -12,11 +12,11 @@
 
 namespace test_assign_v2{
 namespace xxx_option{
-namespace xxx_standard{
+namespace xxx_std_modifier{
 
     void test();
 
-}// xxx_standard
+}// xxx_std_modifier
 }// xxx_option
 }// xxx_test_assign
 

Modified: sandbox/assign_v2/libs/assign/v2/test/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -7,6 +7,9 @@
 // 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 <libs/assign/v2/test/put/csv_put.h>
+#include <libs/assign/v2/test/put/delay_csv_put.h>
+#include <libs/assign/v2/test/put/delay_put.h>
 #include <libs/assign/v2/test/put/ptr.h>
 #include <libs/assign/v2/test/put/put.h>
 #include <libs/assign/v2/test/put.h>
@@ -16,7 +19,10 @@
 
     void test(){
 
- //xxx_ptr::test();
+ xxx_csv_put::test();
+ xxx_delay_csv_put::test(); // TODO
+ xxx_delay_put::test();
+ xxx_ptr::test();
         xxx_put::test();
 
     }

Modified: sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ptr.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -25,26 +25,26 @@
 
 namespace test_assign_v2{
 namespace xxx_put{
-namespace xxx_ptr{
+namespace xxx_ptr{
 
     void test(){
 
         namespace as2 = boost::assign::v2;
 
         // ARRAY
- {
- //[test_put_ptr_array
+ {
+ //[test_csv_put_ptr1
             typedef int T;
             T x = 1, y = 2, z = 3; boost::ptr_array<T, 3> cont;
             /*<<Calls `assoc[i++] = new T( t )` for `i = 0` and `t`[^ = ] `x`, `y`, and `z`>>*/as2::csv_put( cont, x, y, z );
-
+
             BOOST_ASSIGN_V2_CHECK( cont.front() == x );
             BOOST_ASSIGN_V2_CHECK( cont.back() == z );
             //]
         }
         // SEQUENCE
         {
- //[test_put_ptr_deque
+ //[test_csv_put_ptr2
             typedef int T; T x = 1, y = 2, z = 0; boost::ptr_deque<T> cont;
             /*<<Calls `assoc.push_back( new T( t ) )` for `t` [^=] `x`, `y`, and `z`>>*/as2::csv_put( cont, x, y, z );
 
@@ -54,23 +54,13 @@
         }
         // MAP
         {
- //[test_put_ptr_map
- typedef std::string key_;
- boost::ptr_map<key_, int> assoc;
- as2::put( assoc )( "jan", 31 )( "feb", 28 )( "mar", 31 );
-
-
- BOOST_ASSIGN_V2_CHECK( assoc["jan"] == 31 );
- BOOST_ASSIGN_V2_CHECK( assoc["mar"] == 31 );
- //]
- }
- {
- //[test_put_ptr_unordered_map
- typedef std::string word_;
+ //[test_put_ptr1
+ typedef std::string word_;
             const char x[] = "foo";
             const char y[4] = { 'b', 'a', 'r', '\0' };
             word_ z = "***baz";
             boost::ptr_unordered_map<int, word_> map;
+
             as2::put( map )( 1, x, 3 )( 2, y )( 3, z, 3, 3 )( 4, "qux" );
 
             assert( map[1] == "foo" ); assert( map[2] == "bar" );
@@ -78,21 +68,20 @@
             //]
         }
         {
- //[test_csv_put_ptr_map
- typedef std::string key_; typedef int days_;
- typedef boost::ptr_map<key_, days_> C;
- typedef as2::value_container_value<C>::type /*<<Same as `std::map<key_, days_>::value_type`>>*/T;
- C map; as2::csv_put( map, T("jan", 31 ), T( "feb", 28 ), T( "mar", 31 ) );
-
-
- BOOST_ASSIGN_V2_CHECK( map["jan"] == 31 );
- BOOST_ASSIGN_V2_CHECK( map["mar"] == 31 );
+ //[test_csv_put_ptr3
+ typedef std::string month_; typedef int days_;
+ boost::ptr_map<month_, days_> q1;
+
+ as2::csv_put<2>( q1, "jan", 31, "feb", 28, "mar", 31 );
+
+ BOOST_ASSIGN_V2_CHECK( q1["jan"] == 31 );
+ BOOST_ASSIGN_V2_CHECK( q1["feb"] == 28 );
+ BOOST_ASSIGN_V2_CHECK( q1["mar"] == 31 );
             //]
         }
         // SET
         {
- // Shows that x, y, z can be variadic
- //[test_csv_put_ptr_set
+ //[test_csv_put_ptr4
             typedef std::string T; boost::ptr_set<T> assoc;
             T x = "isomer", y = "ephemeral", z = "prosaic";
             as2::csv_put( assoc, x, z, y );
@@ -101,9 +90,9 @@
             BOOST_ASSIGN_V2_CHECK( assoc.count( z ) == 1 );
             //]
         }
- {
- //[test_csv_put_ptr_unordered_set
- boost::ptr_unordered_set<std::string> set;
+ {
+ //[test_csv_put_ptr5
+ boost::ptr_unordered_set<std::string> set;
             as2::csv_put( set, "foo", "bar", "baz" );
 
             BOOST_ASSIGN_V2_CHECK( set.count( "foo" ) == 1 );

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -8,31 +8,16 @@
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/array.hpp>
-#include <bitset>
-#include <cmath>
-#include <deque>
 #include <map>
-#include <list>
-#include <queue>
-#include <set>
-#include <stack>
-#include <string>
-#include <utility>
+#include <vector>
 
-#include <boost/assign/v2/support/config/check.hpp>
-#include <boost/assign/v2/support/traits.hpp>
-
-#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 24
-
-#include <boost/assign/v2/include/csv_deque.hpp>
-#include <boost/assign/v2/include/csv_put.hpp>
-#include <boost/assign/v2/include/delay_csv_put.hpp>
+#include <boost/assign/v2/include/csv.hpp>
 #include <boost/assign/v2/include/put.hpp>
+#include <boost/assign/v2/support/config/check.hpp>
+#include <boost/assign/v2/support/config/enable_cpp0x.hpp>
 #include <boost/circular_buffer.hpp>
-#include <boost/multi_array.hpp>
 #include <boost/numeric/conversion/bounds.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 <boost/tuple/tuple.hpp>
@@ -41,6 +26,8 @@
 #include <boost/variant.hpp>
 #include <libs/assign/v2/test/put/put.h>
 
+#include <iostream>
+
 namespace test_assign_v2{
 namespace xxx_put{
 namespace xxx_put{
@@ -48,130 +35,9 @@
     void test(){
 
         namespace as2 = boost::assign::v2;
-
- // STL
- {
- //[test_csv_put_stl
- std::queue<int> adapter; as2::csv_put( adapter, 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 );
- //]
- BOOST_ASSIGN_V2_CHECK( adapter.front() == 1 );
- BOOST_ASSIGN_V2_CHECK( adapter.back() == 100 );
- BOOST_ASSIGN_V2_CHECK( array.front() == 1 );
- BOOST_ASSIGN_V2_CHECK( array.back() == 100 );
- BOOST_ASSIGN_V2_CHECK( assoc.count( 100 ) == 1 );
- BOOST_ASSIGN_V2_CHECK( assoc.count( 1 ) == 1 );
- BOOST_ASSIGN_V2_CHECK( seq.front() == 1 );
- BOOST_ASSIGN_V2_CHECK( seq.back() == 100 );
- }
- // ARRAY
- {
- //[test_csv_put_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( boost::get<str_>( keypad.front() ) == "+" );
- BOOST_ASSIGN_V2_CHECK( boost::get<int>( keypad.back() ) == 9 );
- //]
- 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;
- boost::array<uneven_, 4> ragged;
- as2::put( ragged )
- ( boost::begin( a ), boost::end( a ) )
- ( b )
- ( 1, -99.99 )
- ( );
-
- BOOST_ASSIGN_V2_CHECK( ragged[0].size() == a.size() );
- BOOST_ASSIGN_V2_CHECK( ragged[3].size() == 0 );
- //]
- BOOST_ASSIGN_V2_CHECK( ragged[1].size() == b.size() );
- BOOST_ASSIGN_V2_CHECK( ragged[2].size() == 1 );
- 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 );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[1].back() - b.back() ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].front() + 99.99 ) < eps );
- BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].back() + 99.99 ) < eps );
- }
- // 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> range_3bit;
- as2::csv_put(
- range_3bit
- , str_( "000" ), str_( "001" )
- , str_( "010" ), str_( "011" )
- , str_( "100" ), str_( "101" )
- , str_( "110" ), str_( "111" )
- );
-
- for(unsigned i = 0; i < range_3bit.size(); i++)
- {
- BOOST_ASSIGN_V2_CHECK( range_3bit[i].to_ulong() == i );
- }
- //]
- // unsigned i else warning comparison between signed & unsigned
- }
- {
- // http://bioinfo.mbb.yale.edu/~mbg/dom/fun3/area-codes/
- //[test_put_area_codes
- typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY";
- typedef int code_;
- 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( boost::get<0>( region.front() ) == ny );
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.back() ) == 203 );
- //]
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( region.front() ) == 212 );
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( region.back() ) == ct );
- }
- //SET
- {
- //[test_delay_csv_put_unordered_set
- typedef std::string word_;
- typedef boost::unordered_set<word_> C;
-
- C set, benchmark;
- benchmark.insert( "foo" );
- benchmark.insert( "bar" );
- benchmark.insert( "baz" );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- set | as2::delay_csv_put(
- as2::csv_deque<word_>( "foo", "bar", "baz" )
- ),
- benchmark
- )
- );
- //]
- }
         // MAP
         {
- //[test_put_unordered_map
+ //[test_put1
             typedef std::string word_;
             const char x[] = "foo";
             const char y[4] = { 'b', 'a', 'r', '\0' };
@@ -185,99 +51,52 @@
             //]
         }
         {
- //[test_csv_put_map
+ //[test_put2
             typedef std::string month_; typedef int days_;
- typedef std::map<month_, days_> C;
- typedef C::value_type T;
- C map, benchmark;
+ typedef std::map<month_, days_> map_;
+ typedef boost::tuple<month_ const, days_> pair_;
+ std::deque<pair_> input;
+
+ input.push_back( pair_("jan", 31) );
+ input.push_back( pair_("feb", 28) );
+ input.push_back( pair_("mar", 31) );
 
- as2::csv_put( map, T("jan", 31 ), T( "feb", 28 ), T( "mar", 31 ) );
+ map_ map; as2::put( map ).for_each<2>( input );
 
             BOOST_ASSIGN_V2_CHECK( map["jan"] == 31 );
             BOOST_ASSIGN_V2_CHECK( map["feb"] == 28 );
             BOOST_ASSIGN_V2_CHECK( map["mar"] == 31 );
             //]
         }
- // MULTI-ARRAY
+ // ARRAY
         {
- //[test_csv_put_multi_array
- typedef boost::multi_array<int, 3> array3_;
- typedef array3_::size_type size_;
-
- typedef const size_ dim_;
- dim_ dim1 = 2, dim2 = 3, dim3 = 4;
-
- array3_ array3( boost::extents[dim1][dim2][dim3] );
-
- 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
- );
-
- int 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++ );
- }
- }
- }
+ //[test_put3
+ typedef double fp_; typedef std::vector<fp_> data_;
+ data_ a( 3 ); a[0] = 0.71; a[1] = 0.63; a[2] = 0.85;
+ data_ b( 4 ); b[0] = 0.61; b[1] = 0.69; b[2] = 0.92; b[3] = 0.55;
+ boost::array<data_, 4> ragged;
 
- //]
-
- typedef boost::multi_array_types::index_range range_;
- array3_::array_view<2>::type view =
- array3[ boost::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
- )
- )
- );
+ as2::put( ragged )
+ ( boost::begin( a ), boost::end( a ) )
+ ( b )
+ ( 1, -99.99 )
+ ( );
 
- }
- // OTHER
- {
- //[test_delay_csv_put_cb
- boost::circular_buffer<int> cb(3);
- as2::csv_put( cb, 1, 2, 3 );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(cb, as2::csv_deque(1, 2, 3) )
- );
-
- BOOST_ASSIGN_V2_CHECK(
- boost::range::equal(
- cb | as2::delay_csv_put( as2::csv_deque( 4, 5 ) ),
- as2::csv_deque(3, 4, 5)
- )
- );
+ BOOST_ASSIGN_V2_CHECK( ragged[0].size() == a.size() );
+ BOOST_ASSIGN_V2_CHECK( ragged[3].size() == 0 );
             //]
+ BOOST_ASSIGN_V2_CHECK( ragged[1].size() == b.size() );
+ BOOST_ASSIGN_V2_CHECK( ragged[2].size() == 1 );
+ fp_ eps = boost::numeric::bounds<fp_>::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 );
+ BOOST_ASSIGN_V2_CHECK( fabs( ragged[1].back() - b.back() ) < eps );
+ BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].front() + 99.99 ) < eps );
+ BOOST_ASSIGN_V2_CHECK( fabs( ragged[2].back() + 99.99 ) < eps );
         }
     }// test()
 
 }// xxx_put
-}// xxx_value
+}// xxx_put
 }// xxx_test_assign

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -29,24 +29,24 @@
     {
         namespace as2 = boost::assign::v2;
         {
-
- //[test_ref_array_temporaries
- boost::array<int, 3> ar;
+
+ //[test_ref_array1
+ boost::array<int, 3> ar;
             ar[0] = 1; ar[1] = 10; ar[2] = 100;
-
+
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
                     as2::ref::array( 1 )( 10 )( 100 ),
- ar
+ ar
                 )
             )/*<<Temporaries destroyed past semicolon>>*/;
             //]
         }
         {
- //[test_ref_array_read
+ //[test_ref_array2
             typedef int const T;
             T w = 1, x = 10, y = 100, z = 1000;
- as2::ref::nth_result_of::array<3, T>::type ar3
+ as2::ref::nth_result_of::array<3, T>::type ar3
                 = as2::ref::array( w )( x )( y );
             {
                 T& a = ar3.front(); T& b = ar3.back();
@@ -71,14 +71,14 @@
             }
         }
         {
- //[test_ref_array_write
- typedef int T; T x, y, z; std::vector<T> r( 3 );
+ //[test_ref_array3
+ typedef int T; T x, y, z; std::vector<T> r( 3 );
             r[0] = 1; r[1] = 10; r[2] = 100;
- boost::copy(
+ boost::copy(
                 r,
- boost::begin(
- as2::ref::array( x )( y )( z ) | as2::ref::_get
- )
+ boost::begin(
+ as2::ref::array( x )( y )( z ) | as2::ref::_get
+ )
             );
 
             BOOST_ASSIGN_V2_CHECK( x == r[0] );
@@ -86,8 +86,8 @@
             //]
         }
         {
- //[test_ref_array_assign
- typedef int T; T x, y, z;
+ //[test_ref_array4
+ typedef int T; T x, y, z;
             as2::ref::array( x )( y )( z ).assign( -1 );
 
             BOOST_ASSIGN_V2_CHECK( x == -1 );

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/aux_/list.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -24,7 +24,7 @@
 namespace xxx_aux_{
 namespace xxx_list{
 
- // ------------------------ //
+ // ------------------------ //
     // Checks internal details. //
     // -------------------------//
 
@@ -56,9 +56,9 @@
 // Implication : don't try to save the result.
 #define BOOST_ASSIGN_V2_macro as2::ref::list<tag_>( as2::_nil )( a )( -1 )( c )
         BOOST_ASSIGN_V2_CHECK( &as2::ref::at<0>( BOOST_ASSIGN_V2_macro ) == &a );
- BOOST_ASSIGN_V2_CHECK( as2::ref::at<1>( BOOST_ASSIGN_V2_macro ) == -1 );
+ BOOST_ASSIGN_V2_CHECK( as2::ref::at<1>( BOOST_ASSIGN_V2_macro ) == -1 );
         BOOST_ASSIGN_V2_CHECK( str_( as2::ref::at<2>( BOOST_ASSIGN_V2_macro ) ) == c );
-#undef BOOST_ASSIGN_V2_macro
+#undef BOOST_ASSIGN_V2_macro
         }
         {
             typedef int t_; typedef add_reference<t_>::type r_;
@@ -81,7 +81,7 @@
         {
             typedef as2::ref::alloc_tag::lazy_alloc tag_;
             typedef as2::ref::list_aux::void_ void_;
- typedef as2::nil_ nil_;
+ typedef as2::kwd_nil_ nil_;
             typedef as2::ref::empty_list<tag_>::type empty_;
             {
                 typedef void_ u1_; typedef nil_ l_;

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -29,27 +29,27 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[test_ref_csv_array_temporaries
- boost::array<int, 3> ar;
+ //[test_ref_csv_array1
+ boost::array<int, 3> ar;
             ar[0] = 1; ar[1] = 10; ar[2] = 100;
-
+
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
                     as2::ref::csv_array( 1, 10, 100 ),
- ar
+ ar
                 )
             );
             //]
         }
         {
- //[test_ref_csv_array_read
+ //[test_ref_csv_array2
             typedef int const T;
             T x = 1, y = 10, z = 100;
- as2::ref::nth_result_of::csv_array<3, T>::type ar
+ as2::ref::nth_result_of::csv_array<3, T>::type ar
                 = as2::ref::csv_array( x, y, z );
             /*<-*/{/*->*/
             T& front = ar.front(); T& back = ar.back();
-
+
             BOOST_ASSIGN_V2_CHECK( &front == &x );
             BOOST_ASSIGN_V2_CHECK( &back == &z );
             /*<-*/}/*->*/
@@ -69,14 +69,14 @@
             }
         }
         {
- //[test_ref_csv_array_write
+ //[test_ref_csv_array3
             typedef int T; T x, y, z;
             std::vector<T> r( 3 ); r[0] = 1; r[1] = 10; r[2] = 100;
- boost::copy(
+ boost::copy(
                 r,
- boost::begin(
- as2::ref::csv_array( x, y, z ) | as2::ref::_get
- )
+ boost::begin(
+ as2::ref::csv_array( x, y, z ) | as2::ref::_get
+ )
             );
 
             BOOST_ASSIGN_V2_CHECK( x == r[0] );
@@ -84,8 +84,8 @@
             //]
         }
         {
- //[test_ref_csv_array_assign
- int x, y, z;
+ //[test_ref_csv_array4
+ int x, y, z;
             as2::ref::csv_array( x, y, z ).assign( -1 );
 
             BOOST_ASSIGN_V2_CHECK( x == -1 );
@@ -95,7 +95,7 @@
         {
             //[test_ref_csv_array_converter
             std::queue<int> fifo = /*<<Notice unqualified>>*/converter( as2::ref::csv_array( 1, 2, 3, 4, 5 ) );
-
+
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -22,13 +22,13 @@
         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
+#if BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY != 2
 #error
 #endif
 #endif
 
         // Primarily tests whether a functor is overloaded on any combination of
- // non-const/cont within BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
+ // non-const/cont within BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY
         // (relevant only for CPP03) and on all-non-const and all-const above
         // this limit.
 

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/deque.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/deque.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/deque.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -12,7 +12,8 @@
 #include <boost/test/test_tools.hpp>
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
 
-#include <libs/assign/v2/test/deque.cpp>
+#include <libs/assign/v2/test/deque/csv_deque.cpp>
+#include <libs/assign/v2/test/deque/deque.cpp>
 
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
@@ -21,8 +22,9 @@
     test_suite* test = BOOST_TEST_SUITE( "BOOST_ASSIGN_V2" );
     using namespace test_assign_v2;
     {
-
- test->add( BOOST_TEST_CASE( &xxx_deque::test ) );
+ namespace ns = xxx_deque;
+ test->add( BOOST_TEST_CASE( &ns::xxx_csv_deque::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_deque::test ) );
     }
     return test;
 }

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -20,7 +20,7 @@
 #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>
 using boost::unit_test::test_suite;
 test_suite* init_unit_test_suite( int argc, char* argv[] )
@@ -35,7 +35,7 @@
         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 ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_std_modifier::test ) );
     }
     return test;
 }

Modified: sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/unit_testing/put.cpp 2011-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -13,8 +13,11 @@
 #include <boost/test/test_tools.hpp>
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
 
-#include <libs/assign/v2/test/put/put.cpp> // has to come first as overrides LIMIT_CSV_ARITY
+#include <libs/assign/v2/test/put/csv_put.cpp>
 #include <libs/assign/v2/test/put/ptr.cpp>
+#include <libs/assign/v2/test/put/put.cpp>
+#include <libs/assign/v2/test/put/delay_csv_put.cpp>
+#include <libs/assign/v2/test/put/delay_put.cpp>
 
 #include <boost/test/unit_test.hpp>
 using boost::unit_test::test_suite;
@@ -24,8 +27,11 @@
     using namespace test_assign_v2;
     {
         namespace ns = xxx_put;
- test->add( BOOST_TEST_CASE( &ns::xxx_ptr::test ) );
         test->add( BOOST_TEST_CASE( &ns::xxx_put::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_ptr::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_csv_put::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_delay_put::test ) );
+ test->add( BOOST_TEST_CASE( &ns::xxx_delay_csv_put::test ) );
     }
     return test;
 }

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-06-02 20:25:11 EDT (Thu, 02 Jun 2011)
@@ -11,6 +11,7 @@
 #include <cmath>
 #include <cstddef>
 #include <deque>
+#include <iostream>
 #include <list>
 #include <map>
 #include <queue>
@@ -19,18 +20,21 @@
 #include <boost/assign/v2.hpp>
 #include <boost/circular_buffer.hpp>
 #include <boost/function.hpp>
+#include <boost/lambda/bind.hpp>
 #include <boost/lambda/lambda.hpp>
 #include <boost/numeric/conversion/bounds.hpp>
 #include <boost/ptr_container/ptr_set.hpp>
 #include <boost/range/algorithm_ext/iota.hpp>
 #include <boost/range/algorithm/copy.hpp>
 #include <boost/range/algorithm/equal.hpp>
+#include <boost/range/algorithm/for_each.hpp>
 #include <boost/range/algorithm/max_element.hpp>
 #include <boost/range/algorithm/stable_partition.hpp>
+#include <boost/typeof/typeof.hpp>
 #include <boost/variant.hpp>
 #include <libs/assign/v2/tutorial.h>
 
-namespace tutorial_assign_v2{
+namespace tutorial_assign_v2{
 
     void run()
     {
@@ -38,28 +42,44 @@
         using namespace assign::v2;
         {
             //[tutorial_csv_put
- std::vector<int> numeric( 10 ); iota( numeric, 0 );
- typedef std::string str_; typedef variant< int, str_ > data_;
- array<data_, 16> keypad;
-
- /*<<Equivalent to `put( keypad )( "+" )( "-" )...( "." ).as_arg_list( numeric )`>>*/csv_put( keypad, "+", "-", "*", "/", "=", ".", as_arg_list( numeric ) );
+ std::vector<int> numeric( 10 ); iota( numeric, 0 );
+ typedef std::string str_; typedef variant< int, str_ > data_;
+ array<data_, 17> keypad;
+
+ /*<<Equivalent to `put( keypad )( "+" )( "-" )...( "." ).for_each( numeric )`>>*/csv(
+ put( keypad ),
+ "+", "-", "*", "/", "=", ".", "c"
+ ).for_each( numeric );
 
             assert( get<str_>( keypad.front() ) == "+" );
- assert( get<int>( keypad.back() ) == 9 );
+ assert( get<int>( keypad.back() ) == 9 );
             //]
         }
         {
- //[tutorial_delay_csv_put
+ //[test_delay_csv_put_map
+ typedef std::map<std::string, int> map_; map_ cal;
+ typedef map_::value_type p_;
+
+ boost::for_each(
+ /*<<Calls `cal.insert( p_( k, x ) );` for each [^( k, x )] pair in the argurment list, and returns `cal`>>*/cal | delay_csv_put<2>( "jan", 31, "feb", 28, "mar", 31 ),
+ std::cout
+ << lambda::bind( &p_::first, lambda::_1 ) << ':'
+ << lambda::bind( &p_::second, lambda:: _1 ) << ' '
+ ); // prints jan:31 feb:28 mar:31
+ //]
+ }
+ {
+ //[tutorial_delay_put
             std::deque<int> source( 6 ), target; iota( source, 0 );
-
- range::stable_partition(
- target | delay_csv_put( source ),
- lambda::_1 % 2
+
+ range::stable_partition(
+ target | _delay_put.for_each( source ),
+ lambda::_1 % 2
             );
             //]
             //[tutorial_csv_deque
- assert(
- range::equal( target, csv_deque(1, 3, 5, 0, 2, 4) )
+ assert(
+ range::equal( target, csv_deque(1, 3, 5, 0, 2, 4) )
             );
             //]
         }
@@ -70,12 +90,23 @@
             //]
         }
         {
- //[tutorial_ref_array
+ //[tutorial_ref_csv_array
             int x = 4, y = 6, z = -1;
             int const& max = *max_element( ref::csv_array( x, y, z ) );
 
             assert( &max == &y );
             //]
+ //[tutorial_ref_csv_array_write
+ std::vector<int> vec( 3, 0 );
+ boost::copy(
+ vec,
+ boost::begin(
+ ref::csv_array( x, y, z ) | ref::_get
+ )
+ );
+
+ assert( x == 0 ); assert( y == 0 ); assert( z == 0 );
+ //]
         }
         {
             //[tutorial_ptr_container
@@ -90,29 +121,29 @@
         {
             //[tutorial_chain
             std::vector<int> source( 8 ); boost::iota( source, 1 );
-
+
             array<int, 4> head; int t, a, i, l;
             boost::copy(
                 source,
                 boost::begin(
- head | _chain(
- ref::csv_array( t, a, i, l ) | ref::_get
+ head | _chain(
+ ref::csv_array( t, a, i, l ) | ref::_get
                     )
                 )
             );
 
             assert( range::equal( head, csv_deque( 1, 2, 3, 4 ) ) );
- assert( t == 5 ); assert( a == 6 );
+ assert( t == 5 ); assert( a == 6 );
             assert( i == 7 ); assert( l == 8 );
             //]
         }
         {
             //[tutorial_converter
             typedef std::queue<int> C;
-
+
             C fifo = converter( csv_deque( 1, 2, 3 ) );
-
- assert( fifo.front() == 1 );
+
+ assert( fifo.front() == 1 );
             assert( fifo.back() == 3 );
             //]
 
@@ -123,8 +154,26 @@
             //]
         }
         {
+ //[tutorial_conversion
+ const int sz = 3; typedef boost::array<int, sz> row_;
+
+ convert<row_> as_row;
+ boost::array<row_, sz> matrix3x3 = converter(
+ ref::array
+ ( ref::csv_array( 1, 2, 3 ) | as_row )
+ ( ref::csv_array( 4, 5, 6 ) | as_row )
+ ( ref::csv_array( 7, 8, 9 ) | as_row )
+ );
+
+ for(int i = 0; i < 9; i++)
+ {
+ assert( matrix3x3[ i / 3 ][ i % 3 ] == i + 1 );
+ }
+ //]
+ }
+ {
             //[tutorial_map
- typedef std::string word_;
+ typedef std::string word_;
             const char x[] = "foo";
             const char y[4] = { 'b', 'a', 'r', '\0' };
             word_ z = "***baz";
@@ -140,9 +189,8 @@
             std::vector<double> exponent;
             /*<-*/typedef double(*fp)(double);/*->*/
             typedef function<double(double)> f_;
- /*<<Equivalent to `( put( exponent ) % ( _data = f_( log10 ) ) )( 1.0 ) ...( 10000.0 )`>>*/csv_put(
- exponent
- , _option % ( _data = f_( /*<-*/fp(/*->*/log10/*<-*/)/*->*/ ) )
+ /*<<Equivalent to `exponent.push_back( double( log10( x ) ) )` for [^x = 1.0, ..., 10000.0]>>*/csv(
+ put( exponent ) % ( _data = f_( /*<-*/fp(/*->*/log10/*<-*/)/*->*/ ) )
                 , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
 
@@ -153,15 +201,31 @@
         }
         {
             //[tutorial_push_front
- boost::circular_buffer<int> cb( 3 );
-
+ boost::circular_buffer<int> cb( 3 );
+
             assert(
                 range::equal(
- cb | delay_csv_put( _option % _push_front, csv_deque( 3, 2, 1 ) ),
- csv_deque( 1, 2, 3 )
+ cb | delay_csv_put<push_front_, 1>( 3, 2, 1 ),
+ csv_deque( 1, 2, 3 )
                 )
             );
             //]
- } }
+ }
+ {
+ //[tutorial_repeat
+ BOOST_AUTO( _modifier, ( _repeat = 2 ) );
+
+ assert(
+ boost::range::equal(
+ csv(
+ deque<int, push_front_>( _nil) % _modifier
+ , 1, 10, 100, 1000
+ ),
+ csv_deque( 1000, 1000, 100, 100, 10, 10, 1, 1 )
+ )
+ );
+ //]
+ }
+ }
 
 }// tutorial_assign_v2


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