Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70078 - in sandbox/assign_v2: boost/assign/v2 boost/assign/v2/detail/config boost/assign/v2/put/adapter boost/assign/v2/put/fun boost/assign/v2/put/modifier libs/assign/v2 libs/assign/v2/speed libs/assign/v2/src libs/assign/v2/test libs/assign/v2/test/put libs/assign/v2/test/put/modifier
From: erwann.rogard_at_[hidden]
Date: 2011-03-17 17:03:31


Author: e_r
Date: 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
New Revision: 70078
URL: http://svn.boost.org/trac/boost/changeset/70078

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/detail/config/check.hpp | 9 -
   sandbox/assign_v2/boost/assign/v2/put/adapter/as_arg_list.hpp | 28 +-
   sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp | 18 -
   sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp | 24 +-
   sandbox/assign_v2/boost/assign/v2/put/modifier/deduce.hpp | 12
   sandbox/assign_v2/boost/assign/v2/put/modifier/insert.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/modifier/push.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/modifier/push_back.hpp | 3
   sandbox/assign_v2/boost/assign/v2/put/modifier/push_front.hpp | 2
   sandbox/assign_v2/boost/assign/v2/utility.hpp | 2
   sandbox/assign_v2/libs/assign/v2/speed/put_ref.cpp | 317 ---------------------------------------
   sandbox/assign_v2/libs/assign/v2/speed/put_ref.h | 23 --
   sandbox/assign_v2/libs/assign/v2/src/main.cpp | 23 +-
   sandbox/assign_v2/libs/assign/v2/test/mix.cpp | 53 ------
   sandbox/assign_v2/libs/assign/v2/test/mix.h | 22 --
   sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp | 9
   sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp | 14 -
   sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 24 +-
   sandbox/assign_v2/libs/assign/v2/tutorial.h | 2
   19 files changed, 76 insertions(+), 513 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/detail/config/check.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/detail/config/check.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/detail/config/check.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -11,15 +11,6 @@
 #define BOOST_ASSIGN_V2_CHECK_ER_2010_HPP
 #ifndef BOOST_ASSIGN_V2_CHECK
 #include <boost/assert.hpp>
-//[check
-/*<<
-For unit-testing, do, instead,
-``
- #include <boost/test/test_tools.hpp>
- #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_CHECK( p )
-``
-<<*/
 #define BOOST_ASSIGN_V2_CHECK( p ) BOOST_ASSERT( p )
-//]
 #endif // BOOST_ASSIGN_V2_CHECK
 #endif // BOOST_ASSIGN_V2_CHECK_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/adapter/as_arg_list.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/adapter/as_arg_list.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/adapter/as_arg_list.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -17,38 +17,38 @@
 namespace assign{
 namespace v2{
 namespace put_aux{
-
+
     template<typename R>
     class as_arg_list_adapter
     {
-
+
         typedef typename boost::range_iterator<R>::type ri_;
         typedef boost::iterator_range<ri_> ir_;
         public:
-
+
         as_arg_list_adapter(R& range)
- :ir(
+ :ir(
                 boost::make_iterator_range( range )
             )
         {}
-
+
         typedef ir_ result_type;
-
+
         result_type operator()()const{ return this->ir; }
 
         private:
- as_arg_list_adapter();
- ir_ ir;
+ as_arg_list_adapter();
+ ir_ ir;
 
     };
 
-//[syntax_put_adapteras_arg_list
+//[syntax_put_adapter_as_arg_list
 namespace result_of{
 
     template<typename R>
     struct as_arg_list
- {
- typedef/*<-*/ BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/) as_arg_list_adapter<R> /*->*/type;
+ {
+ typedef/*<-*/ BOOST_ASSIGN_V2_IGNORE(/*->*/ unspecified /*<-*/) as_arg_list_adapter<R> /*->*/type;
     };
 
 }// result_of
@@ -60,7 +60,7 @@
 
         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)/*<-*/
@@ -74,7 +74,7 @@
 namespace result_of{
 
     template<typename R>
- struct as_arg_list
+ struct as_arg_list
         : put_aux::result_of::as_arg_list<R>
     {};
 
@@ -82,5 +82,5 @@
 }// v2
 }// assign
 }// boost
-
+
 #endif // BOOST_ASSIGN_V2_PUT_ADAPTER_AS_ARG_LIST_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/fun/deduce.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -22,33 +22,27 @@
 namespace put_aux{
 
     template<typename /*<<Pointer-container>>*/C>
- struct /*<<Meta-function mapping the `C`'s pointer-type to a factory thereof>>*/ deduce_fun_pointer
+ struct /*<<Meta-function mapping the `C`'s pointer-type to a factory thereof>>*/ deduce_fun_pointer/*<-*/
     {
-//<-
         typedef typename v2::container_traits::value<C>::type value_type;
         typedef functor_aux::new_<value_type> type;
-//->
- };
+ }/*->*/;
 
     template<typename /*<<Value-container>>*/C>
- struct /*<<Meta-function mapping `C`'s value-type to a factory thereof>>*/ deduce_fun_value
+ struct /*<<Meta-function mapping `C`'s value-type to a factory thereof>>*/ deduce_fun_value/*<-*/
     {
-//<-
         typedef typename v2::container_traits::value<C>::type value_type;
         typedef functor_aux::constructor<value_type> type;
-//->
- };
+ }/*->*/;
 
     template<typename /*<<Either of a value or pointer-container>>*/C>
- struct /*<<Meta-function mapping `C`s element-type to a factory thereof>>*/deduce_fun
-//<-
+ struct /*<<Meta-function mapping `C`s element-type to a factory thereof>>*/deduce_fun/*<-*/
         : boost::mpl::eval_if<
             container_traits::is_ptr_container<C>,
             deduce_fun_pointer<C>,
             deduce_fun_value<C>
>
-//->
- {};
+ {}/*->*/;
 
 }// put_aux
 //]

Modified: sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/fun/modulo.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -23,14 +23,14 @@
 
     template<typename D>
     struct modulo_fun{
-
+
         typedef put_aux::replace_fun<D> meta_;
-
+
         template<typename F>
         struct apply : ::boost::mpl::apply1<meta_, F>{};
-
+
     };
-
+
 }// result_of
 
     template<typename F = keyword_aux::ignore>
@@ -40,7 +40,7 @@
         modulo_fun(F f) : f_( f ){}
 
         F const& fun()const{ return this->f_; }
-
+
         private:
         F f_;
     };
@@ -58,12 +58,12 @@
     }
 
     struct keyword_fun{
-
+
         template<typename F>
- modulo_fun<F> operator=(F const& f)const{
- return modulo_fun<F>( f );
+ modulo_fun<F> operator=(F const& f)const{
+ return modulo_fun<F>( f );
         }
-
+
     };
 
 }// put_aux
@@ -74,11 +74,9 @@
 namespace result_of{
 
     template<typename D>
- struct modulo_fun
-//<-
+ struct modulo_fun/*<-*/
         : put_aux::result_of::modulo_fun<D>
-//->
- {};
+ {}/*->*/;
 
 }// result_of
 //]

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/deduce.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/deduce.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/deduce.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -49,7 +49,7 @@
 #else
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_ASSOCIATIVE(CaseNumber)\
 BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_CASE(insert, container_traits::is_associative, CaseNumber)\
-/**/
+/**/
 #endif
 
 #ifdef BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_ARRAY
@@ -83,13 +83,13 @@
 
 //[example_put_modifier_deduce_switch
 #ifdef BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH
-#warning
+#warning
 #else
 BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_ASSOCIATIVE(0)
 BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_ARRAY(1)
 BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_ADAPTER(2)
 BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH_DEFAULT(3)
-#define BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH
+#define BOOST_ASSIGN_V2_PUT_MODIFIER_DEDUCE_SWITCH
 //]
 #endif
 
@@ -97,11 +97,9 @@
 namespace put_aux{
 
     template<typename C>
- struct /*<<Meta-function returning a modifier-tag>>*/deduce_modifier_tag
-//<-
+ struct /*<<Meta-function returning a modifier-tag>>*/deduce_modifier_tag/*<-*/
         : switch_aux::result< switch_tag::deduce_put, C>
-//->
- {};
+ {}/*->*/;
 
 }// put_aux
 //]

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/insert.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/insert.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/insert.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -9,10 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_INSERT_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_INSERT_ER_2010_HPP
-//[put_modifier_insert
 #include <boost/assign/v2/put/modifier/standard/modifier.hpp>
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD_TAG(insert)
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD(insert)
-//]
 
 #endif // BOOST_ASSIGN_V2_PUT_MODIFIER_INSERT_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/push.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/push.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/push.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -9,10 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_ER_2010_HPP
-//[put_modifier_push
 #include <boost/assign/v2/put/modifier/standard/modifier.hpp>
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD_TAG(push)
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD(push)
-//]
 
 #endif // BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/push_back.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/push_back.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/push_back.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -9,9 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_BACK_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_BACK_ER_2010_HPP
-//[put_modifier_push_back
 #include <boost/assign/v2/put/modifier/standard/modifier.hpp>
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD_TAG(push_back)
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD(push_back)
-//]
+
 #endif // BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_BACK_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/put/modifier/push_front.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modifier/push_front.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modifier/push_front.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -9,10 +9,8 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_FRONT_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_FRONT_ER_2010_HPP
-//[put_modifier_push_front
 #include <boost/assign/v2/put/modifier/standard/modifier.hpp>
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD_TAG(push_front)
 BOOST_ASSIGN_V2_PUT_MODIFIER_MODULO_STANDARD(push_front)
-//]
 
 #endif // BOOST_ASSIGN_V2_PUT_MODIFIER_PUSH_FRONT_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/utility.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility.hpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -14,4 +14,4 @@
 #include <boost/assign/v2/utility/conversion.hpp>
 #include <boost/assign/v2/utility/csv.hpp>
 
-#endif BOOST_ASSIGN_V2_UTILITY_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_UTILITY_ER_2010_HPP

Modified: sandbox/assign_v2/libs/assign/v2/speed/put_ref.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/speed/put_ref.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/speed/put_ref.cpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -1,316 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#include <iostream>
-#include <vector>
-#include <deque>
-#include <string>
-
-#include <boost/preprocessor/comparison.hpp>
-#include <boost/preprocessor/control.hpp>
-#include <boost/preprocessor/repetition.hpp>
-#include <boost/preprocessor/seq.hpp>
-
-#include <boost/format.hpp>
-#include <boost/progress.hpp>
-#include <boost/typeof/typeof.hpp>
-
-#include <boost/assign/list_of.hpp>
-#include <boost/assign/list_inserter.hpp>
-#define BOOST_ASSIGN_V2_LIMIT_CSV_ARITY 128
-#include <boost/assign/v2/put.hpp>
-#include <boost/assign/v2/ref.hpp>
-
-#include <libs/assign/v2/speed/tools.h>
-#include <libs/assign/v2/speed/put_ref.h>
-
-namespace speed_assign_v2{
-namespace xxx_put_ref{
-
-void run(std::ostream& os)
-{
-
- namespace as1 = boost::assign;
- namespace as2 = as1::v2;
-
- os << "-> Runtime efficiency " << std::endl;
-
- typedef boost::timer timer_;
- typedef std::string str_;
- typedef boost::format f_;
-
-// [---- Warning : don't override these markups
-
- //[types
- typedef std::vector<int> elem_; // T
- // This STL type is that used internally by v2::deque<>
- typedef std::deque< elem_ > cont_;
- //]
- //[sim_param
- // t is a random size element, with max size :
- const int elem_size = 100;
- // Number of loops over which exec time is summed
- const int n_loops = 1000 * 1000;
- //]
-
-// ----]
-
-// The number of values is n :
-// fun(t[0], ....,t[n-1])
-// fun( t[0] )...( t[n-1] )
-// The mapping N -> n is
-// [1-> 1, 2-> 2, 3->4, 4->8, 5->16, 6->32, 7->64, 8->128]
-// Warning : limit_N > 6 may cause a long compilation time
-#define limit_N 0
-#if BOOST_PP_GREATER(limit_N, 8)
-#error
-#endif
-
- elem_ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( 128, a, rand_vec(elem_size) );
-
- {
- f_ f("T = std::vector<int> of max size %1%");
- f % elem_size;
- os << f.str() << std::endl;
- }
- {
- f_ f("Number of loops over which execution time is summed : %1% ");
- f % n_loops;
- os << f.str() << std::endl;
- }
-
-#define SEQ (a0)(a1)(a2)(a3)(a4)(a5)(a6)(a7)(a8)(a9)(a10)(a11)(a12)(a13)(a14)\
-(a15)(a16)(a17)(a18)(a19)(a20)(a21)(a22)(a23)(a24)(a25)(a26)(a27)(a28)(a29)\
-(a30)(a31)(a32)(a33)(a34)(a35)(a36)(a37)(a38)(a39)(a40)(a41)(a42)(a43)(a44)\
-(a45)(a46)(a47)(a48)(a49)(a50)(a51)(a52)(a53)(a54)(a55)(a56)(a57)(a58)(a59)\
-(a60)(a61)(a62)(a63)(a64)(a65)(a66)(a67)(a68)(a69)(a70)(a71)(a72)(a73)(a74)\
-(a75)(a76)(a77)(a78)(a79)(a80)(a81)(a82)(a83)(a84)(a85)(a86)(a87)(a88)(a89)\
-(a90)(a91)(a92)(a93)(a94)(a95)(a96)(a97)(a98)(a99)(a100)(a101)(a102)(a103)\
-(a104)(a105)(a106)(a107)(a108)(a109)(a110)(a111)(a112)(a113)(a114)(a115)(a116)\
-(a117)(a118)(a119)(a120)(a121)(a122)(a123)(a124)(a125)(a126)(a127)\
-/**/
-#define MACRO1(fun, N, param)\
- {\
- timer_ timer;\
- for(int i = 0; i < n_loops; ++i)\
- {\
- BOOST_AUTO(\
- rng, \
- (\
- fun BOOST_PP_IF(\
- param,\
- BOOST_PP_SEQ_FIRST_N(N, SEQ),\
- ( BOOST_PP_ENUM_PARAMS(N, a) )\
- )\
- )\
- );\
- int sz = (int)rng.size();\
- if(sz != N)\
- os << "ERROR\n";\
- }\
- elapsed = timer.elapsed();\
- }\
-/**/
-#define MACRO_push_back(z, data, elem ) cont.push_back( elem );
-#define MACRO2(N, param1, param2, param3, param4, param5, param6)\
- {\
- timer_ timer;\
- for(int i = 0; i < n_loops; ++i)\
- {\
- cont.clear();\
- BOOST_PP_EXPR_IF(\
- param1,\
- BOOST_PP_SEQ_FOR_EACH(\
- MACRO_push_back,\
- ~,\
- BOOST_PP_SEQ_FIRST_N(N, SEQ)\
- );\
- )\
- BOOST_PP_EXPR_IF(\
- param2, \
- as2::put(cont) BOOST_PP_SEQ_FIRST_N(N, SEQ);\
- )\
- BOOST_PP_EXPR_IF(\
- param3, \
- as2::csv_put(cont)( BOOST_PP_ENUM_PARAMS(N, a) );\
- )\
- BOOST_PP_EXPR_IF(\
- param4, \
- cont | as2::_put BOOST_PP_SEQ_FIRST_N(N, SEQ);\
- )\
- BOOST_PP_EXPR_IF(\
- param5, \
- cont | as2::_csv_put( BOOST_PP_ENUM_PARAMS(N, a) );\
- )\
- BOOST_PP_EXPR_IF(\
- param6, \
- as1::push_back(cont) BOOST_PP_SEQ_FIRST_N(N, SEQ);\
- )\
- int sz = (int)cont.size();\
- if(sz != N)\
- os << "ERROR\n";\
- }\
- elapsed = timer.elapsed();\
- }\
-/**/
-
- cont_ cont;
-
- str_ str_n = "[";
- str_ str_t = "[";
-
- for(int i = 0; i < limit_N ; i++)
- {
- f_ f( "%1%" ); f % ( i + 1 );
- str_n += "%" + f.str() + "% ";
- str_t += "%" + f.str() + "% " + "s ";
- }
- str_n += "]";
- str_t += "]";
-
- //os << str_n << std::endl;
- //os << str_t << std::endl;
-
- // STL
- str_ str_stl_push_back = "vec.push_back( t0 ); ... vec.push_back( tn-1 );";
-
- // Boost.Assign
- str_ str_v1_cref_list_of = "cref_list_of<n>( t0 )...( tn-1 )";
- str_ str_v1_list_of = "list_of( t0 )...( tn-1 )";
- str_ str_v1_push_back = "push_back( vec )( t0 )...( tn-1 )";
-
- // Boost.Assign 2.0
- str_ str_v2_csv_deque = "csv_deque(t0, ...,tn-1)";
- str_ str_v2_deque = "deque<T>( _nil )( t0 )...( tn-1 )";
- str_ str_v2_ref_csv_array = "ref::csv_array(t0, ..., tn-1)";
- str_ str_v2_ref_array = "ref::array( t0 )...( tn-1 )";
- str_ str_v2_csv_put = "csv_put( vec )(t0, ..., tn-1)";
- str_ str_v2_put = "put( vec )( t0 )...( tn-1 )";
- str_ str_v2_pipe_csv_put = "vec | _csv_put(t0, ..., tn-1)";
- str_ str_v2_pipe_put = "vec | _put( t0 )...( tn-1 )";
-
- f_ f_n( str_( "n = " ) + str_n );
-
- f_ f_stl_push_back( str_stl_push_back + str_t );
-
- f_ f_v1_list_of( str_v1_list_of + str_t );
- f_ f_v1_cref_list_of( str_v1_cref_list_of + str_t );
- f_ f_v1_push_back( str_v1_push_back + str_t );
-
- f_ f_v2_csv_deque( str_v2_csv_deque + str_t );
- f_ f_v2_deque( str_v2_deque + str_t ) ;
- f_ f_v2_ref_csv_array( str_v2_ref_csv_array + str_t );
- f_ f_v2_ref_array( str_v2_ref_array + str_t );
- f_ f_v2_csv_put( str_v2_csv_put + str_t );
- f_ f_v2_put( str_v2_put + str_t );
- f_ f_v2_pipe_csv_put( str_v2_pipe_csv_put + str_t );
- f_ f_v2_pipe_put( str_v2_pipe_put + str_t );
-
-// MACRO2
-// param1 : stl_push_back
-// param2 : v2_put
-// param3 : v2_csv_put
-// param4 : v2_pipe_put
-// param5 : v2_pipe_csv_put
-// param6 : v1_push_back
-
-#define MACRO(N)\
- {\
- MACRO2( N, 1, 0, 0, 0, 0, 0 )\
- f_stl_push_back % elapsed;\
- MACRO2( N, 0, 1, 0, 0, 0, 0 )\
- f_v2_put % elapsed;\
- MACRO2( N, 0, 0, 1, 0, 0, 0 )\
- f_v2_csv_put % elapsed;\
- MACRO2( N, 0, 0, 0, 1, 0, 0 )\
- f_v2_pipe_put % elapsed;\
- MACRO2( N, 0, 0, 0, 0, 1, 0 )\
- f_v2_pipe_csv_put % elapsed;\
- MACRO2( N, 0, 0, 0, 0, 0, 1 )\
- f_v1_push_back % elapsed;\
- \
- MACRO1( as1::list_of, N, 1 )\
- f_v1_list_of % elapsed;\
- \
- MACRO1( as1::cref_list_of<N>, N, 1 )\
- f_v1_cref_list_of % elapsed;\
- \
- MACRO1( as2::csv_deque, N, 0 )\
- f_v2_csv_deque % elapsed;\
- \
- MACRO1( as2::deque<elem_>( as2::_nil ), N, 1 )\
- f_v2_deque % elapsed;\
- \
- MACRO1( as2::ref::csv_array, N, 0 )\
- f_v2_ref_csv_array % elapsed;\
- \
- MACRO1( as2::ref::array, N, 1 )\
- f_v2_ref_array % elapsed;\
- \
- f_n % N;\
- }\
-/**/
-
- double elapsed = 0;
- if(elapsed){
- //nothing
- }
-// -----------------------------------N------------------n----------
-// Dont uncomment. Modify instead limit_N
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(1, limit_N), MACRO(1) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(2, limit_N), MACRO(2) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(3, limit_N), MACRO(4) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(4, limit_N), MACRO(8) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(5, limit_N), MACRO(16) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(6, limit_N), MACRO(32) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(7, limit_N), MACRO(64) )
-BOOST_PP_EXPR_IF( BOOST_PP_LESS_EQUAL(8, limit_N), MACRO(128) )
-
-#undef limit_n
-#undef SEQ
-#undef MACRO_push_back
-#undef MACRO1
-#undef MACRO2
-#undef MACRO
-#undef BOOST_ASSIGN_V2_LIMIT_CSV_ARITY
-
- os << std::endl;
- os << f_n.str() << std::endl;
- os << "*** STL" << std::endl;
- os << f_stl_push_back.str() << std::endl;
- os << "*** Boost.Assign" << std::endl;
-
- os << "** v1" << std::endl;
- os << f_v1_list_of.str() << std::endl;
- os << f_v1_cref_list_of.str() << std::endl;
- os << f_v1_push_back.str() << std::endl;
-
- os << "** v2" << std::endl;
- os << "* like v1's list_of()" << std::endl;
- os << f_v2_csv_deque.str() << std::endl;
- os << f_v2_deque.str() << std::endl;
-
- os << "* like v1's ref_list_of<>()" << std::endl;
- os << f_v2_ref_csv_array.str() << std::endl;
- os << f_v2_ref_array.str() << std::endl;
-
- os << "* like v1's push_back()" << std::endl;
- os << "Backend" << std::endl;
- os << f_v2_csv_put.str() << std::endl;
- os << f_v2_put.str() << std::endl;
- os << "Frontend" << std::endl;
- os << f_v2_pipe_csv_put.str() << std::endl;
- os << f_v2_pipe_put.str() << std::endl;
-
- os << "<- " << std::endl;
-
-}
-
-}// xxx_put_ref
-}// speed_assign_v2
+// TODO remove file

Modified: sandbox/assign_v2/libs/assign/v2/speed/put_ref.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/speed/put_ref.h (original)
+++ sandbox/assign_v2/libs/assign/v2/speed/put_ref.h 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -1,22 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_ASSIGN_V2_SPEED_PUT_REF_ER_2010_HPP
-#define LIBS_ASSIGN_V2_SPEED_PUT_REF_ER_2010_HPP
-#include <ostream>
-
-namespace speed_assign_v2{
-namespace xxx_put_ref{
-
-void run(std::ostream&);
-
-}// xxx_put_ref
-}// speed_assign_v2
-
-#endif
+// 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-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -8,8 +8,8 @@
 #include <libs/assign/v2/tutorial.h>
 
 // Speed
-//#include <fstream>
-//#include <libs/assign/v2/speed/put_ref.h>
+#include <fstream>
+#include <libs/assign/v2/speed/test.h>
 
 #include <string>
 #include <iostream>
@@ -46,22 +46,19 @@
     }
     {
         using namespace test_assign_v2;
- xxx_put::test();
+ //xxx_put::test();
         //xxx_mix::test();
- xxx_ref::test();
- xxx_utility::test();
+ //xxx_ref::test();
+ //xxx_utility::test();
     }
     {
         tutorial_assign_v2::run();
     }
-
- /*
- {
- using namespace speed_assign_v2;
- std::ofstream ofs("results");
- xxx_put_ref::run(ofs);
- }
- */
+ {
+ using namespace speed_assign_v2;
+ std::ofstream ofs("assign_v2_speed_test");
+ speed_assign_v2::test(ofs);
+ }
 
     return 0;
 

Modified: sandbox/assign_v2/libs/assign/v2/test/mix.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/mix.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/mix.cpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -1,52 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#include <deque>
-#include <boost/lambda/lambda.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <boost/range/algorithm/stable_partition.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/put/pipe/csv_put.hpp>
-#include <boost/assign/v2/ref/array.hpp>
-#include <libs/assign/v2/test/mix.h>
-
-namespace test_assign_v2{
-namespace xxx_mix{
-
- // Tests interaction between different functionalities
-
- void test(){
-
- using namespace boost;
- using namespace lambda;
- namespace as2 = assign::v2;
-
- {
- // suggested by JB:
- //[mix_stable_partition
- std::deque<int> cont;
- range::stable_partition(
- /*<< Calls `cont.push_back( t )` for [^t=0,...,5], and returns `cont` >>*/
- cont | as2::_csv_put( 0, 1, 2, 3, 4, 5 ),
- _1 % 2
- );
- //BOOST_ASSIGN_V2_CHECK(range::equal(
- // cont,
- /*<< [^1, 3, ..., 4] are held by reference (not copies) >>*/
- // as2::ref::csv_array(1, 3, 5, 0, 2, 4)
- //));
-
- // as2::ref::csv_array(1, 3, 5, 0, 2, 4);
-
- //]
- }
- }
-
-}// xxx_mix
-}// xxx_test_assign
+// TODO remove file

Modified: sandbox/assign_v2/libs/assign/v2/test/mix.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/mix.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/mix.h 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -1,21 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// Boost.Assign v2 //
-// //
-// Copyright (C) 2003-2004 Thorsten Ottosen //
-// Copyright (C) 2010 Erwann Rogard //
-// Use, modification and distribution are subject to the //
-// Boost Software License, Version 1.0. (See accompanying file //
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
-//////////////////////////////////////////////////////////////////////////////
-#ifndef LIBS_ASSIGN_V2_TEST_MIX_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_MIX_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_mix{
-
- void test();
-
-}// xxx_mix
-}// xxx_test_assign
-
-#endif
+// TODO remove file

Modified: sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -11,7 +11,6 @@
 #include <boost/mpl/assert.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/assign/v2/detail/config/check.hpp>
-
 #include <boost/assign/v2/put/deque/csv_deque.hpp>
 #include <boost/assign/v2/put/deque/deque.hpp>
 
@@ -23,9 +22,9 @@
 
     void test()
     {
-
+
         using namespace boost;
- namespace as2 = assign::v2;
+ namespace as2 = assign::v2;
         {
             //[test_put_deque_ints
             typedef as2::result_of::deque<int>::type C0;
@@ -47,10 +46,10 @@
         {
             //[test_put_deque_str_literal
             typedef std::string str_;
- BOOST_ASSIGN_V2_CHECK(
+ BOOST_ASSIGN_V2_CHECK(
                 str_( as2::deque<const char*>( "x" )( "y" )( "z" )[1] ) == "y"
             );
- BOOST_ASSIGN_V2_CHECK(
+ BOOST_ASSIGN_V2_CHECK(
                 str_( as2::csv_deque( "x", "y", "z" )[1] ) == "y"
             );
             //]

Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/standard.cpp 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -13,7 +13,6 @@
 #include <set>
 #include <string>
 #include <boost/assign/v2/detail/config/check.hpp>
-
 #include <boost/assign/v2/put/modifier/standard.hpp>
 #include <boost/assign/v2/put/put.hpp>
 #include <boost/assign/v2/put/deque.hpp>
@@ -61,9 +60,8 @@
             //[test_put_modifier_push_front
             std::deque<double> sqrt2;
             ( as2::put( sqrt2 ) % as2::_push_front )( 1.41421 )( 1.4142 )( 1.414 )( 1.41 );
-
-
- // TODO abs()<eps
+
+
             BOOST_ASSIGN_V2_CHECK( boost::lower_bound( sqrt2, 1.41 ) == boost::begin( sqrt2 ) );
             BOOST_ASSIGN_V2_CHECK( boost::upper_bound( sqrt2, 1.41421 ) == boost::end( sqrt2 ) );
             //]
@@ -71,7 +69,7 @@
         {
             //[test_put_modifier_push
             std::queue<int> fifo; ( as2::put( fifo ) % as2::_push )( 72 )( 31 )( 48 );
-
+
             BOOST_ASSIGN_V2_CHECK( fifo.front() == 72 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 48 );
             //]
@@ -79,16 +77,16 @@
         {
             //[test_put_modifier_insert
             std::set<std::string> letters; ( as2::put( letters ) % 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 ) );
             //]
         }
         {
             //[test_put_modifier_push_back
- typedef int int_; std::list<int> list;
+ typedef int int_; std::list<int> list;
             ( as2::put( list ) % as2::_push_back )( 72 )( 31 )( 48 );
-
+
             BOOST_ASSIGN_V2_CHECK( list.front() == 72 );
             BOOST_ASSIGN_V2_CHECK( list.back() == 48 );
             //]

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-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -8,6 +8,7 @@
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //
 //////////////////////////////////////////////////////////////////////////////
 #include <assert.h>
+#include <cstddef>
 #include <vector>
 #include <deque>
 #include <map>
@@ -61,19 +62,19 @@
             //[tutorial_chain
             std::vector<int> consecutive8( 8 ); for(int i = 0; i < 8; i++){ consecutive8[i] = 1 + i; }
             array<int, 5> consecutive5; int six, seven, eight;
- boost::copy(
- consecutive8,
+ boost::copy(
+ consecutive8,
                 begin( consecutive5 | _chain( ref::csv_array( six, seven, eight ) | ref::_get ) )
             );
- assert(consecutive5[0] == 1); assert(consecutive5[4] == 5);
+ assert(consecutive5[0] == 1); assert(consecutive5[4] == 5);
             assert( six == 6 ); assert( eight == 8);
             //]
         }
- {
+ {
             //[tutorial_conversion
- std::queue<int> fifo = converter( csv_deque( 72, 31, 48 ) );
+ std::queue<int> fifo = converter( csv_deque( 72, 31, 48 ) );
             assert( fifo.front() == 72 );
- //]
+ //]
         }
         {
             //[tutorial_arg_forwarding
@@ -84,12 +85,13 @@
         {
             //[tutorial_parametrization
             using namespace lambda;
- typedef int T; array<T, 4> powers = converter( csv_deque( 1, 10, -1, -1 ) );
- int shift = 2; ( put( powers ) % ( _iterate = var( shift )++ ) )( 100 )( 1000 );
+ typedef int T; array<T, 4> powers = converter( csv_deque( 1, 10, -1, -1 ) );
+ std::size_t shift = 2; ( put( powers ) % ( _iterate = var( shift )++ ) )( 100 )( 1000 );
 
- int value = 1; for(shift = 0; shift < powers.size(); shift++){ assert( powers[shift] == value ); value *=10; }
+ int value = 1;
+ for(shift = 0; shift < powers.size(); shift++){ assert( powers[shift] == value ); value *=10; }
             //]
         }
     }
-
-}// tutorial_assign_v2
\ No newline at end of file
+
+}// tutorial_assign_v2

Modified: sandbox/assign_v2/libs/assign/v2/tutorial.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/tutorial.h (original)
+++ sandbox/assign_v2/libs/assign/v2/tutorial.h 2011-03-17 17:03:28 EDT (Thu, 17 Mar 2011)
@@ -16,4 +16,4 @@
 
 }// tutorial_assign_v2
 
-#endif LIBS_ASSIGN_V2_TUTORIAL_ER_2010_H
\ No newline at end of file
+#endif // LIBS_ASSIGN_V2_TUTORIAL_ER_2010_H


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