Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71520 - in sandbox/assign_v2: boost/assign/v2/conversion boost/assign/v2/deque boost/assign/v2/deque/cpp03 boost/assign/v2/interpreter 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 libs/assign/v2 libs/assign/v2/test libs/assign/v2/test/option
From: erwann.rogard_at_[hidden]
Date: 2011-04-26 16:26:05


Author: e_r
Date: 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
New Revision: 71520
URL: http://svn.boost.org/trac/boost/changeset/71520

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/conversion/convert.hpp | 7 ++-
   sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp | 33 ++++++++++--------
   sandbox/assign_v2/boost/assign/v2/deque/cpp03/csv_deque.hpp | 8 ++--
   sandbox/assign_v2/boost/assign/v2/deque/csv_deque.hpp | 8 ++--
   sandbox/assign_v2/boost/assign/v2/deque/deque.hpp | 13 ++++---
   sandbox/assign_v2/boost/assign/v2/interpreter/crtp.hpp | 10 +++--
   sandbox/assign_v2/boost/assign/v2/interpreter/csv.hpp | 14 ++++----
   sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp | 4 +-
   sandbox/assign_v2/boost/assign/v2/interpreter/fwd.hpp | 4 +-
   sandbox/assign_v2/boost/assign/v2/option/data.hpp | 16 +++-----
   sandbox/assign_v2/boost/assign/v2/option/list.hpp | 69 +++++++++++++++------------------------
   sandbox/assign_v2/boost/assign/v2/option/modifier/framework.hpp | 4 +-
   sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp | 2
   sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp | 2
   sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/cpp03/csv_put.hpp | 4 +-
   sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp | 6 +-
   sandbox/assign_v2/boost/assign/v2/put/put.hpp | 10 ++--
   sandbox/assign_v2/boost/assign/v2/ref/array/array.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/array/interface.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp | 2
   sandbox/assign_v2/libs/assign/v2/test/conversion.cpp | 4 +-
   sandbox/assign_v2/libs/assign/v2/test/option/data.cpp | 4 +-
   sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/list.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp | 8 ++--
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 50 ++++++++++++++++------------
   30 files changed, 147 insertions(+), 151 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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -24,8 +24,8 @@
     struct copy{};
 
 }// convert_tag
-//<-
 namespace conversion_aux{
+//<-
 
     template<typename C, typename R>
     C csv_put_copy(C& cont, R const& range)
@@ -69,11 +69,11 @@
         return dispatch<C>( arg, r, tag_() );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
-
 //->
 
     template<typename C, typename Arg = nil_>
- struct convert/*<-*/{
+ struct convert/*<-*/
+ {
     
         convert(){}
         convert(Arg arg):arg_( arg ){}
@@ -96,6 +96,7 @@
     template<typename C, typename Arg = nil_>
     struct convert/*<-*/
         : conversion_aux::convert<C, Arg>
+ /*->*/
     {
 //<-
         typedef conversion_aux::convert<C> super_t;

Modified: sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/conversion/converter.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -37,17 +37,18 @@
 
         public:
 
- explicit converter(
- Arg const& arg,
- typename call_traits<R>::param_type source
- )/*<-*/
- : arg_( arg ), source_( boost::make_iterator_range( source ) )
- {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
-
         explicit converter(typename call_traits<R>::param_type source)/*<-*/
              : source_( boost::make_iterator_range( source ) )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
+ converter(
+ typename call_traits<R>::param_type source,
+ Arg const& arg
+ )/*<-*/
+ : arg_( arg ),
+ source_( boost::make_iterator_range( source ) )
+ {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
+
         // Implicit conversion
         template<typename C>
         operator C() const/*<-*/
@@ -82,16 +83,18 @@
 
     template<typename R>
     typename result_of::converter<R>::type
- converter(R const& r)/*<-*/{
+ converter(R const& r)/*<-*/
+ {
         typedef typename result_of::converter<R>::type result_;
         return result_( r );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
- template<typename Arg, typename R>
+ template<typename R, typename Arg>
     typename result_of::converter<R, Arg>::type
- converter(Arg const& arg, R const& r)/*<-*/{
+ converter(R const& r, Arg const& arg)/*<-*/
+ {
         typedef typename result_of::converter<R, Arg>::type result_;
- return result_( arg, r );
+ return result_( r, arg );
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 
 //]
@@ -120,17 +123,17 @@
     {\
         return ::boost::assign::v2::converter( range );\
     }\
- template<typename Arg, BOOST_PP_SEQ_ENUM(\
+ template<BOOST_PP_SEQ_ENUM(\
         BOOST_PP_SEQ_TRANSFORM(\
             BOOST_ASSIGN_V2_CONVERSION_CONVERTER_NAME_LOOKUP_PARAM,\
             ~,\
             Seq\
         )\
- )>\
+ ), typename Arg>\
     typename ::boost::assign::v2::result_of::converter<R, Arg>::type \
- converter(Arg const& arg, R const& range )\
+ converter(R const& range, Arg const& arg )\
     {\
- return ::boost::assign::v2::converter( arg, range );\
+ return ::boost::assign::v2::converter( range, arg );\
     }\
 /**/
 

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -23,7 +23,7 @@
 #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_option_crtp<T0>,\
+ is_list_option<T0>,\
         result_of::csv_deque<T>\
>::type\
     csv_deque(BOOST_PP_ENUM_BINARY_PARAMS(\
@@ -39,7 +39,7 @@
         BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)\
>\
     typename boost::lazy_enable_if<\
- is_option_crtp<O>,\
+ is_list_option<O>,\
         result_of::csv_deque_option<O, T>\
>::type\
     csv_deque(\
@@ -75,7 +75,7 @@
 #define BOOST_ASSIGN_V2_MACRO(z, N, is_const)\
     template<typename T>\
     typename boost::lazy_disable_if<\
- is_option_crtp<T>,\
+ is_list_option<T>,\
         result_of::csv_deque<T>\
>::type\
     csv_deque(\
@@ -88,7 +88,7 @@
     }\
     template<typename O, typename T>\
     typename boost::lazy_enable_if<\
- is_option_crtp<O>,\
+ is_list_option<O>,\
         result_of::csv_deque_option<O, T>\
>::type\
     csv_deque(\

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -38,11 +38,11 @@
 namespace result_of{
 
     template<typename T>
- struct csv_deque/*<-*/
+ struct csv_deque
         : result_of::deque<
             typename csv_deque_deduce_value<T>::type
>
- {}/*->*/;
+ {};
 
     template<typename O, typename T>
     struct csv_deque_option/*<-*/
@@ -66,7 +66,7 @@
 //->
     template<typename T, typename... Args>
     typename /*<-*/boost::lazy_disable_if<
- is_option_crtp_cpp0x<T>,
+ is_list_option_cpp0x<T>,
         /*->*/result_of::csv_deque<T>/*<-*/
>/*->*/::type
     csv_deque(T&& t, Args&& ... args)/*<-*/
@@ -78,7 +78,7 @@
 
     template<typename T, typename O, typename... Args>
     typename /*<-*/boost::lazy_enable_if<
- is_option_crtp<O>,
+ is_list_option<O>,
         /*->*/result_of::csv_deque_option<O, T>/*<-*/
>/*->*/::type
     csv_deque(O const& options, T&& t, Args&& ... args)/*<-*/

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -42,8 +42,8 @@
     template<typename T, typename F, typename MTag>
     class deque_interpreter
         : public interpreter_crtp<
- typename deque_impl<T>::type, F, MTag, data_tag::value,
- deque_interpreter<T, F, MTag>
+ deque_interpreter<T, F, MTag>,
+ typename deque_impl<T>::type, F, MTag, data_tag::value
>
     {
         typedef typename deque_impl<T>::type impl_;
@@ -51,7 +51,8 @@
 //<-
         typedef impl_ const cimpl_;
         typedef interpreter_crtp<
- impl_, F, MTag, data_tag::value, deque_interpreter
+ deque_interpreter
+ , impl_, F, MTag, data_tag::value
> put_crtp_;
 //->
 
@@ -74,7 +75,7 @@
         // Constructor
         deque_interpreter()/*<-*/
             {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- explicit deque_interpreter(
+ deque_interpreter(
             impl_ const& cont, F const& f, modifier_ const& m
         )/*<-*/
             : put_crtp_( f, m ), impl( cont )
@@ -163,14 +164,14 @@
 namespace result_of{
 
     template<typename T>
- struct deque/*<-*/
+ struct deque
     {
         typedef typename boost::remove_cv<T>::type t_;
         typedef typename deque_impl<t_>::type impl_;
         typedef typename deduce_data_generator<impl_>::type f_;
         typedef typename deduce_modifier_tag<impl_>::type modifier_tag_;
         typedef deque_interpreter<t_, f_, modifier_tag_> type;
- }/*->*/;
+ };
 
 }// result_of
 

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -102,6 +102,7 @@
 //[syntax_interpreter_crtp
 namespace interpreter_aux{
 
+/*<-*/
     template<typename C, typename D>
     struct ConceptDerivedInterpreter1{
 
@@ -132,13 +133,14 @@
         static modifier_ m;
 
     };
+/*->*/
 
     template<
- typename C // Container,
+ typename D // Derived
+ , typename C // Container
         , typename F // Data generator
         , typename MTag // Modifier tag
         , typename DTag // Data tag
- , typename D // Derived
>
     class interpreter_crtp
 //<-
@@ -146,7 +148,7 @@
         , public modifier_holder<MTag>
 #if !BOOST_ASSIGN_V2_ENABLE_CPP0X
         , public functor_aux::crtp_unary_and_up<
- interpreter_crtp<C, F, MTag, DTag, D>,
+ interpreter_crtp<D, C, F, MTag, DTag>,
             ::boost::mpl::always< D const& >
>
 #endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
@@ -173,7 +175,7 @@
         explicit interpreter_crtp( F const& f )/*<-*/
             : data_gen_holder_( f )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- explicit interpreter_crtp( F const& f, modifier_type const& m )/*<-*/
+ interpreter_crtp( F const& f, modifier_type const& m )/*<-*/
             : data_gen_holder_( f ), modifier_holder_( m )
         {}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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -34,16 +34,16 @@
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
 //->
 
- template<typename C, typename F, typename MTag, typename DTag, typename D>
+ template<typename D, typename C, typename F, typename MTag, typename DTag>
     void csv(
- interpreter_crtp<C, F, MTag, DTag, D> const& interpreter
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter
     )/*<-*/
     {
     }BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- template<typename C, typename F, typename MTag, typename DTag, typename D
- , typename T, typename... Args>
+ template<typename D, typename C, typename F, typename MTag, typename DTag,
+ typename T, typename... Args>
     void csv(
- interpreter_crtp<C, F, MTag, DTag, D> const& interpreter,
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter,
         T&& t, Args&&... args
     )/*<-*/
     {
@@ -58,11 +58,11 @@
 #define BOOST_ASSIGN_V2_MACRO1(z, i, data) ( BOOST_PP_CAT(_, i) )
 #define BOOST_ASSIGN_V2_MACRO2(z, N, is_const)\
     template<\
- typename C, typename F, typename MTag, typename DTag, typename D\
+ typename D, typename C, typename F, typename MTag, typename DTag\
         BOOST_PP_ENUM_TRAILING_PARAMS(N, typename T)\
>\
     void csv(\
- interpreter_crtp<C, F, MTag, DTag, D> const& interpreter\
+ interpreter_crtp<D, C, F, MTag, DTag> const& interpreter\
         BOOST_PP_ENUM_TRAILING_BINARY_PARAMS(\
             N, T, BOOST_PP_EXPR_IF(is_const, const) & _\
         )\

Modified: sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/interpreter/data.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -34,8 +34,8 @@
 
 namespace interpreter_aux{
 
- template<
- typename C // Value or pointer-container
+ template<
+ typename C // Value- or pointer-container
>
     struct deduce_data_generator/*<-*/
         : data_generator<

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -38,13 +38,13 @@
 namespace interpreter_aux{
 
     template<
- typename C // Value or pointer-container
+ typename C // Value- or pointer-container
>
     struct deduce_data_generator;
 
     template<typename C> struct deduce_data_tag;
 
- template<typename C, typename F, typename MTag, typename DTag, typename D>
+ template<typename D, typename C, typename F, typename MTag, typename DTag>
     class interpreter_crtp;
 
     template<typename Tag> struct interpreter_modifier;

Modified: sandbox/assign_v2/boost/assign/v2/option/data.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/data.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/data.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -26,7 +26,7 @@
 namespace interpreter_aux{
 
     template<
- typename C // Value or pointer-container
+ typename C // Value- or pointer-container
         , typename F // Functor or keyword
>
     struct data_generator/*<-*/
@@ -84,12 +84,8 @@
         
 }// result_of
 
- // F is a functor or either of the keywors:
- // element_
- // key_
- // map_
- // use_default_
- // value_
+ // F is either a functor or one of the keywords :
+ // element_, key_, map_, use_default_, value_
     template<typename F = ignore_>
     struct option_data/*<-*/
         : option_crtp<
@@ -139,11 +135,11 @@
 //->
 
     // Overrides data generator
- template<typename C, typename F, typename MTag
- , typename DTag, typename D, typename F1>
+ template<typename D, typename C, typename F, typename MTag
+ , typename DTag, typename F1>
     typename result_of::option_data<D, C, F1>::type
     operator%(
- interpreter_crtp<C, F, MTag, DTag, D> const& lhs,
+ interpreter_crtp<D, C, F, MTag, DTag> const& lhs,
         option_data<F1> const& rhs
     )/*<-*/
     {

Modified: sandbox/assign_v2/boost/assign/v2/option/list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/list.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -74,27 +74,7 @@
     };
     
 }// result_of
-
- template<typename O, bool is_list = false>
- struct option_crtp{};
-
- template<typename O>
- struct is_option_crtp
- : boost::mpl::or_<
- boost::is_base_of< option_crtp<O, false>, O>,
- boost::is_base_of< option_crtp<O, true>, O>
- >
- {};
-
- template<
- typename O // O&&, O&
- >
- struct is_option_crtp_cpp0x : is_option_crtp<
- typename boost::remove_cv<
- typename boost::remove_reference<O>::type
- >::type
- >{};
-
+
     template<
         typename Head = nil_,
         typename Tail = nil_,
@@ -112,20 +92,6 @@
         {}
     };
 
- template<typename Head, typename Tail>
- struct list_option_inherit<Head, Tail, true>
- : Tail,
- option_crtp<
- list_option<Head, Tail, true>,
- true
- >
- {
- list_option_inherit(){}
- list_option_inherit( Tail tail )
- : Tail( tail )
- {}
- };
-
     template<typename Head, typename Tail, bool exit>
     struct list_option
         : list_option_inherit<Head, Tail, exit>
@@ -178,14 +144,27 @@
 
     typedef list_option<> empty_list_option;
 
+ template<typename O>
+ struct is_list_option
+ : boost::is_base_of< empty_list_option, O>
+ {};
+
+ template<
+ typename O // O&&, O&
+ >
+ struct is_list_option_cpp0x : is_list_option<
+ typename boost::remove_cv<
+ typename boost::remove_reference<O>::type
+ >::type
+ >{};
+
     template<
- typename C, typename F, typename MTag,
- typename DTag, typename D,
+ typename D, typename C, typename F, typename MTag, typename DTag,
         typename H, typename T
>
     typename result_of::apply_list_option<H, T, D>::type
     operator%(
- interpreter_crtp<C, F, MTag, DTag, D> const& lhs,
+ interpreter_crtp<D, C, F, MTag, DTag> const& lhs,
         list_option<H, T> const& list
     )
     {
@@ -196,15 +175,19 @@
 
     template<typename L, typename O1>
     struct list_option_modulo
- : L:: template result<O1>
+ : L::template result<O1>
     {};
 
 
 }// result_of
 }// interpreter_aux
+
     typedef interpreter_aux::empty_list_option empty_list_option_;
+
 namespace{
- empty_list_option_ _list_option = empty_list_option_();
+
+ empty_list_option_ _option = empty_list_option_();
+
 }
 namespace interpreter_aux{
 namespace result_of{
@@ -222,12 +205,14 @@
 
 }// result_of
     
+ template<typename O> struct option_crtp{};
+
     template<typename O1, typename O2>
     typename result_of::option_modulo<O1, O2>::type
- operator%(option_crtp<O1, false> const option1, O2 const& option2)
+ operator%(option_crtp<O1> const option1, O2 const& option2)
     {
         O1 const& ref = static_cast<O1 const&>( option1 );
- return _list_option % ref % option2;
+ return _option % ref % option2;
     }
 
 }// interpreter_aux

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -80,11 +80,11 @@
             
 }// result_of
 
- template<typename C, typename F, typename MTag, typename DTag, typename D,
+ 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%(
- interpreter_crtp<C, F, MTag, DTag, D> const& lhs,
+ interpreter_crtp<D, C, F, MTag, DTag> const& lhs,
         option_modifier<Keyword, Arg> const& rhs
     )/*<-*/
     {

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/iterate.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -58,7 +58,7 @@
         interpreter_modifier()
             : ptr( new arg_() )
         {}
- explicit interpreter_modifier(
+ interpreter_modifier(
             ignore_,
             typename boost::call_traits<arg_>::param_type arg
         ) : ptr( new arg_( arg ) )

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/mapped.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -38,7 +38,7 @@
         public:
 
         interpreter_modifier() : ptr( new arg_() ){}
- explicit interpreter_modifier(
+ interpreter_modifier(
             ignore_,
             typename boost::call_traits<arg_>::param_type arg
         ) : ptr( new arg_( arg ) )

Modified: sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/option/modifier/repeat.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -39,7 +39,7 @@
         typedef std::size_t size_type;
 
         interpreter_modifier() : n_( 0 ){}
- explicit interpreter_modifier( inner_type inner, size_type n )
+ interpreter_modifier( inner_type inner, size_type n )
             : inner_( inner ), n_( n )
         {}
 

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -21,7 +21,7 @@
 #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_option_crtp<O>\
+ 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)& _)\
@@ -34,7 +34,7 @@
     }\
     template<typename C, BOOST_PP_ENUM_PARAMS(N, typename T)>\
     typename boost::disable_if<\
- is_option_crtp<T0>\
+ is_list_option<T0>\
>::type csv_put(\
         C& cont,\
         BOOST_PP_ENUM_BINARY_PARAMS(N, T, BOOST_PP_EXPR_IF(is_const, const)& _)\

Modified: sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/csv_put.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -105,7 +105,7 @@
 
     template<typename C, typename O, bool is, typename... Args>
     /*<-*/typename boost::enable_if<
- is_option_crtp<O>
+ is_list_option<O>
>::type BOOST_ASSIGN_V2_IGNORE(/*->*/void /*<-*/)
     /*->*/csv_put(
         C& cont,
@@ -124,7 +124,7 @@
 
     template<typename C, typename T, typename... Args>
     /*<-*/typename boost::disable_if<
- is_option_crtp_cpp0x<T>
+ is_list_option_cpp0x<T>
>::type BOOST_ASSIGN_V2_IGNORE(/*->*/void /*<-*/)
     /*->*/csv_put( C& cont, T&& t, Args&&... args)/*<-*/
     {
@@ -158,7 +158,7 @@
             : super2_t( r )
         {}
 
- explicit delayed_csv_put(O options, R& r)
+ delayed_csv_put(O options, R& r)
             : super1_t( options ), super2_t( r )
         {}
 

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -28,20 +28,20 @@
         protected ref::copy_wrapper< C >::type,
 //->
         public interpreter_aux::interpreter_crtp<
- C, F, MTag, DTag,
             put_interpreter<C, F, MTag, DTag>
+ , C, F, MTag, DTag
>
     {
 //<-
         typedef interpreter_aux::interpreter_crtp<
- C, F, MTag, DTag, put_interpreter
+ put_interpreter
+ , C, F, MTag, DTag
> super2_t;
 //->
         public:
 
         typedef /*<-*/ typename super2_t::result_type
- BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)/*->*/
- result_type;
+ BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/)/*->*/result_type;
 //<-
         protected:
 
@@ -56,7 +56,7 @@
         explicit put_interpreter( C& cont )/*<-*/
             : super1_t( cont )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
- explicit put_interpreter( C& cont, F const& f, modifier_ const& m )/*<-*/
+ put_interpreter( C& cont, F const& f, modifier_ const& m )/*<-*/
             : super1_t( cont ), super2_t( f, m )
         {}BOOST_ASSIGN_V2_IGNORE(/*->*/;/*<-*/)/*->*/
 

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-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -42,7 +42,7 @@
 
     template<
         array_size_type N
- , typename U // U& has to be a reference
+ , typename U // U must not be a reference
>
     struct array/*<-*/
         : array_aux::recursive_result<N, U>

Modified: sandbox/assign_v2/boost/assign/v2/ref/array/interface.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/array/interface.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/array/interface.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -65,7 +65,7 @@
         typedef interface<Impl, D> this_;
         typedef typename traits_::result_of_get_ result_of_get_;
 //->
- typedef /*<-*/typename traits_::param_type BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/) /*->*/param_type;
+ typedef /*<-*/typename traits_::param_type BOOST_ASSIGN_V2_IGNORE(/*->*/unspecified/*<-*/)/*->*/ param_type;
 
         public:
 

Modified: sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/aux_/list/container.hpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -49,7 +49,7 @@
             typedef container<Tag, H1, this_> type;
         };
 
- explicit container(typename call_traits<T>::param_type t, H h)
+ container(typename call_traits<T>::param_type t, H h)
             : tail_holder_( t ),
             head_holder_( h )
         {}

Modified: sandbox/assign_v2/libs/assign/v2/test/conversion.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/conversion.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/conversion.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -122,8 +122,8 @@
             typedef size_ const dim_;
             dim_ dim1 = 3, dim2 = 3;
             array2_ array2 = converter(
- boost::extents[dim1][dim2],
- as2::csv_deque(-1, +1, -1, +1, -1, +1, -1, +1, -1)
+ as2::csv_deque(-1, +1, -1, +1, -1, +1, -1, +1, -1),
+ boost::extents[dim1][dim2]
             );
             
             const int benchmark [] = {

Modified: sandbox/assign_v2/libs/assign/v2/test/option/data.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/data.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/data.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -41,7 +41,7 @@
             typedef boost::function<double(double)> f_;
             as2::csv_put(
                 exponent
- , as2::_data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ )
+ , as2::_option % ( as2::_data = f_( /*<-*/fp(/*->*/ log10 /*<-*/)/*->*/ ) )
                 , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
 
@@ -57,7 +57,7 @@
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(
                     as2::csv_deque(
- as2::_data = ( boost::lambda::var( k ) *= boost::lambda::_1 ),
+ as2::_option % ( as2::_data = ( boost::lambda::var( k ) *= boost::lambda::_1 ) ),
                         1, 2, 3, 4, 5
                     ),
                     as2::csv_deque( 1, 2, 6, 24, 120 )

Modified: sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/iterate.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -51,7 +51,7 @@
             int index = 3;
             as2::csv_put(
                 alternating
- , as2::_iterate = boost::lambda::var( index )++
+ , as2::_option % ( as2::_iterate = boost::lambda::var( index )++ )
                 , +2, -3, +3, -4, +4, -5, +5
             );
 

Modified: sandbox/assign_v2/libs/assign/v2/test/option/list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/list.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/list.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -30,7 +30,7 @@
         {
             //[test_option_list
             std::deque<int> cont;
- ( as2::put( cont ) % as2::_list_option )( 4 )( 5 );
+ ( as2::put( cont ) % as2::_option )( 4 )( 5 );
             
             BOOST_ASSIGN_V2_CHECK( cont[0] == 4 );
             BOOST_ASSIGN_V2_CHECK( cont[1] == 5 );

Modified: sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/mapped.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -39,7 +39,7 @@
             (
                 as2::put( year )
                     ( "feb", 28 )( "apr", 30 )( "jun", 30 )( "sep", 30 )( "nov", 30 )
- % ( as2::_data = as2::_key ) % ( as2::_mapped = ( boost::lambda::_1 = 31 ) )
+ % ( as2::_data = as2::_key ) % ( as2::_mapped = ( boost::lambda::constant( 31 ) ) )
             )/*<<Calls `year[ month_( "jan" ) ] = 31`>>*/( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
             
             BOOST_ASSIGN_V2_CHECK( year["jan"] == 31 );

Modified: sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/repeat.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -27,7 +27,7 @@
         {
             //[test_option_repeat_simple
             std::vector<int> cont;
- as2::csv_put( cont, as2::_repeat = 2, 1, 10, 100 );
+ as2::csv_put( cont, as2::_option % ( as2::_repeat = 2 ) , 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal(

Modified: sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/row_major.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -37,7 +37,7 @@
         array2_ array2( boost::extents[dim1][dim2] );
 
         int k = -2;
- BOOST_AUTO( option, as2::_row_major = ( boost::lambda::var( 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 );
         

Modified: sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/option/std_modifier.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -72,7 +72,7 @@
         {
             //[test_option_push
             // NB: This option is dedundant with the default
- std::queue<int> fifo; as2::csv_put( fifo, as2::_push, 1, 10, 100 );
+ std::queue<int> fifo; as2::csv_put( fifo, as2::_option % as2::_push, 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 1 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 100 );
@@ -82,7 +82,7 @@
             //[test_option_insert
             // NB: This option is dedundant with the default
             std::set<std::string> letters;
- as2::csv_put( letters, as2::_insert, "d", "a", "c", "b" );
+ as2::csv_put( letters, as2::_option % as2::_insert, "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 ) );
@@ -92,7 +92,7 @@
             //[test_option_push_back
             // NB: This option is dedundant with the default
             std::list<int> list;
- as2::csv_put( list, as2::_push_back, 1, 10, 100 );
+ as2::csv_put( list, as2::_option % as2::_push_back, 1, 10, 100 );
 
             BOOST_ASSIGN_V2_CHECK(
                 boost::range::equal( list, as2::csv_deque( 1, 10, 100 ) )
@@ -115,7 +115,7 @@
             //[test_option_push_front_deque
             BOOST_AUTO(
                 two_power_n,
- as2::csv_deque( as2::_push_front, 16, 8, 4, 2, 1 )
+ as2::csv_deque( as2::_option % as2::_push_front, 16, 8, 4, 2, 1 )
             );
 
             BOOST_ASSIGN_V2_CHECK(

Modified: sandbox/assign_v2/libs/assign/v2/tutorial.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/tutorial.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/tutorial.cpp 2011-04-26 16:26:00 EDT (Tue, 26 Apr 2011)
@@ -8,6 +8,7 @@
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
 //////////////////////////////////////////////////////////////////////////////
 #include <assert.h>
+#include <cmath>
 #include <cstddef>
 #include <deque>
 #include <list>
@@ -16,6 +17,9 @@
 #include <vector>
 #include <boost/assign/v2.hpp>
 #include <boost/array.hpp>
+#include <boost/circular_buffer.hpp>
+#include <boost/numeric/conversion/bounds.hpp>
+#include <boost/function.hpp>
 #include <boost/lambda/lambda.hpp>
 #include <boost/ptr_container/ptr_set.hpp>
 #include <boost/range/algorithm_ext/iota.hpp>
@@ -28,8 +32,6 @@
 
 namespace tutorial_assign_v2{
 
- // MSVC REMINDER : fully qualify boost::begin boost::end - error C2668
-
     void run()
     {
         using namespace boost;
@@ -40,7 +42,7 @@
             typedef std::string str_; typedef variant< int, str_ > data_;
             array<data_, 16> keypad;
             
- csv_put( keypad, "+", "-", "*", "/", "=", "." , as_arg_list( numeric ) );
+ /*<<Equivalent to `put( keypad )( "+" )( "-" )...`>>*/csv_put( keypad, "+", "-", "*", "/", "=", "." , as_arg_list( numeric ) );
 
             assert( get<str_>( keypad.front() ) == "+" );
             assert( get<int>( keypad.back() ) == 9 );
@@ -136,26 +138,32 @@
             //]
         }
         {
- //[tutorial_modifier
- typedef array<int, 10> C; C series;
- series[0] = -1; series[1] = +1;
- series[2] = -2;
-
- C::size_type index = 3;
- csv_put(
- series
- , _iterate = lambda::var( index )++
- , +2, -3, +3, -4, +4, -5 , +5
- );
-
- assert(
- range::equal(
- series,
- csv_deque( -1, +1, -2, +2, -3, +3, -4, +4, -5, +5 )
- )
+ //[tutorial_data
+ 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 /*<-*/)/*->*/ ) )
+ , 1.0, 10.0, 100.0, 1000.0, 10000.0
             );
+
+ double eps = numeric::bounds<double>::smallest();
+ assert( fabs( exponent.front() - 0.0 ) < eps );
+ assert( fabs( exponent.back() - 4.0 ) < eps );
             //]
         }
- }
+ {
+ //[tutorial_push_front
+ boost::circular_buffer<int> cb( 3 );
+
+ assert(
+ range::equal(
+ cb | delay_csv_put( _push_front, csv_deque( 3, 2, 1 ) ),
+ csv_deque( 1, 2, 3 )
+ )
+ );
+ //]
+ } }
 
 }// 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