Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66866 - in sandbox/statistics/support/libs/assign/v2: example src test/ref
From: erwann.rogard_at_[hidden]
Date: 2010-11-29 19:53:40


Author: e_r
Date: 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
New Revision: 66866
URL: http://svn.boost.org/trac/boost/changeset/66866

Log:
minor update to /libs/assign/v2
Text files modified:
   sandbox/statistics/support/libs/assign/v2/example/anon.cpp | 2 +-
   sandbox/statistics/support/libs/assign/v2/example/chain.cpp | 10 +++++-----
   sandbox/statistics/support/libs/assign/v2/example/conversion.cpp | 39 ---------------------------------------
   sandbox/statistics/support/libs/assign/v2/example/put_adaptor.cpp | 2 +-
   sandbox/statistics/support/libs/assign/v2/example/put_range.cpp | 2 --
   sandbox/statistics/support/libs/assign/v2/example/ref_anon.cpp | 2 +-
   sandbox/statistics/support/libs/assign/v2/src/main.cpp | 11 ++++++-----
   sandbox/statistics/support/libs/assign/v2/test/ref/fusion_matrix.cpp | 21 ++++++++++++---------
   sandbox/statistics/support/libs/assign/v2/test/ref/wrapper.cpp | 2 +-
   9 files changed, 27 insertions(+), 64 deletions(-)

Modified: sandbox/statistics/support/libs/assign/v2/example/anon.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/anon.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/anon.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -18,7 +18,7 @@
         void run(std::ostream& os)
     {
                 using namespace boost::assign::v2;
- os << "---xxx_anon " << std::endl;
+ os << "* xxx_anon " << std::endl;
         {
                         os << "csv_anon" << ' ';
             //[csv_anon

Modified: sandbox/statistics/support/libs/assign/v2/example/chain.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/chain.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/chain.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -21,11 +21,11 @@
         void run(std::ostream& os)
     {
             using namespace boost::assign::v2;
- os << "---xxx_chain";
+ os << "* xxx_chain" << std::endl;
                 {
                         os << "chain_read";
                 //[chain_read
- typedef boost::array<T, 1> cont1_; cont1_ cont1; cont1[0] = x;
+ typedef boost::array<T, 1> cont1_; cont1_ cont1; cont1[0] = x;
             typedef std::list<T> cont3_; cont3_ cont3; cont3.push_back( z );
             using namespace adaptor;
             namespace ns = ref::assign_copy;
@@ -41,7 +41,7 @@
             boost::copy(
                 vec,
                 boost::begin(
- cont1 /* lvalue */ | _chain(
+ cont1 /* lvalue */ | _chain(
                         ns::csv_anon( y1 /* lvalue */ ) /* rvalue */
                     ) | _chain( cont3 /* lvalue */ )
                 )
@@ -52,10 +52,10 @@
                 //]
         }
                 {
-
+
         }
 
         }
-
+
 }// xxx_chain
 }// example_assign_v2

Modified: sandbox/statistics/support/libs/assign/v2/example/conversion.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/conversion.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/conversion.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -25,25 +25,6 @@
                 using namespace boost::assign::v2;
         namespace ns_ref = ref::assign_copy;
         {
-// TODO remove
-/*
- {
- //[convert_anon_explicit
- typedef std::queue<T> to_;
- to_ to = ref::assign_copy::csv_anon( x, y, z ).put_convert<to_>();
- to.pop();
- BOOST_ASSERT( to.front() == y ); // because FIFO
- //]
- }
- {
- //[convert_anon_auto
- typedef std::deque<T> to_;
- to_ to;
- csv_anon( x, y, z ).put_convert<to_>( );
- to.pop_back(); BOOST_ASSERT( to.back() == y );
- //]
- }
-*/
             {
                     //[convert_stack
                 typedef boost::array<T, 3> from_;
@@ -55,26 +36,6 @@
                 );
                 //]
             }
-// TODO remove
-/*
- {
- //[convert_chain
- typedef boost::array<T, 2> from_;
- typedef std::stack<T> to_;
- from_ from; from[0] = x; from[1] = y;
- using namespace adaptor;
- namespace ns = ref::assign_copy;
- BOOST_ASSERT(
- (
- (
- from | _chain( ns::csv_anon( z ) )
- ).put_convert<to_>()
- ).top() == z // because LIFO
- );
- //]
-
- }
-*/
         }
     }
 

Modified: sandbox/statistics/support/libs/assign/v2/example/put_adaptor.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/put_adaptor.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/put_adaptor.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -24,7 +24,7 @@
         void run(std::ostream& os)
     {
                 using namespace boost::assign::v2;
- os << "---xxx_put_adaptor " << std::endl;
+ os << "* xxx_put_adaptor " << std::endl;
         {
             os << "vector" << ' ';
             //[vector

Modified: sandbox/statistics/support/libs/assign/v2/example/put_range.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/put_range.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/put_range.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -20,7 +20,6 @@
         void run(std::ostream& os)
     {
                 using namespace boost::assign::v2;
- os << "---xxx_put_range " << std::endl;
         {
                 //[put_range_queue
             typedef std::vector<T> from_; from_ from( 3 );
@@ -32,7 +31,6 @@
             BOOST_ASSERT( to.back() == z );
             //]
         }
- os << std::endl;
     }
 
 }// xxx_put_range

Modified: sandbox/statistics/support/libs/assign/v2/example/ref_anon.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/example/ref_anon.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/example/ref_anon.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -20,7 +20,7 @@
     {
 
         using namespace boost::assign::v2;
- os << "---xxx_ref_anon " << std::endl;
+ os << "* xxx_ref_anon " << std::endl;
         {
                         os << "ref::assign_copy::csv_anon";
                 //[assign_copy_read

Modified: sandbox/statistics/support/libs/assign/v2/src/main.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/src/main.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/src/main.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -42,7 +42,7 @@
 #include <libs/assign/v2/example/chain.h>
 #include <libs/assign/v2/example/fusion.h>
 
-#include <libs/assign/v2/speed/anon_put_ref.h>
+//#include <libs/assign/v2/speed/anon_put_ref.h>
 
 int main (int argc, char * const argv[]) {
 
@@ -52,6 +52,7 @@
         {
                 using namespace test_assign_v2;
 
+ std::cout << "** tests:" << std::endl;
             xxx_type_traits::xxx_has_push::test();
             xxx_type_traits::xxx_has_value_type::test();
             xxx_type_traits::xxx_has_static_size::test();
@@ -89,6 +90,7 @@
         }
     {
         using namespace example_assign_v2;
+ std::cout << "** examples:" << std::endl;
         xxx_put_adaptor::run(std::cout);
         xxx_anon::run(std::cout);
         xxx_put_range::run(std::cout);
@@ -98,12 +100,11 @@
         xxx_fusion::run(std::cout);
     }
     {
- using namespace speed_assign_v2;
- xxx_anon_put_ref::run(std::cout);
+ //using namespace speed_assign_v2;
+ //std::cout << "** speed:" << std::endl;
+ //xxx_anon_put_ref::run(std::cout);
     }
 
- std::cout << "main.cpp" << std::endl;
-
     return 0;
 
 }

Modified: sandbox/statistics/support/libs/assign/v2/test/ref/fusion_matrix.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/test/ref/fusion_matrix.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/fusion_matrix.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -56,8 +56,8 @@
         );\
     }\
 /**/
- a_ a = 1;
- b_ b = 2;
+ int a = 1;
+ #define B 2
         {
 
             typedef boost::mpl::apply1<
@@ -73,6 +73,7 @@
>::type result_;
             {
                 // b passed as const lvalue
+ cvalue_ b = B;
 
                 empty_ e;
                 result_ result = e // i k
@@ -99,23 +100,25 @@
                 empty_ e;
                 result_ result = e // i k
                     ( a ) // 0 1
- ( value_( b ) ) // 1 1
+ ( B ) // 1 1
                     ( ) // 2 0
                     ( a, a ) // 3 2
- ( a, value_( b ) ) // 4 2
- ( value_( b ), value_( b ) ); // 5 2
+ ( a, B ) // 4 2
+ ( B, B ); // 5 2
 
                 MACRO(0, 0, a)
- MACRO(1, 0, b)
+ MACRO(1, 0, B)
                 typedef result_::static_row_result<3>::type row_;
                 row_ row = result.static_row( boost::mpl::int_<3>() );
                 MACRO(3, 0, a)
                     MACRO(3, 1, a)
                 MACRO(4, 0, a)
- MACRO(4, 1, b)
- MACRO(5, 0, b)
- MACRO(5, 1, b)
+ MACRO(4, 1, B)
+ MACRO(5, 0, B)
+ MACRO(5, 1, B)
             }
+
+ #undef B
         }
 #undef MACRO
 

Modified: sandbox/statistics/support/libs/assign/v2/test/ref/wrapper.cpp
==============================================================================
--- sandbox/statistics/support/libs/assign/v2/test/ref/wrapper.cpp (original)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/wrapper.cpp 2010-11-29 19:53:38 EST (Mon, 29 Nov 2010)
@@ -60,7 +60,7 @@
             }
             {
                 cval_ a = 1;
- w_ w = w_( val_(a) );
+ w_ w = w_( 1 );
                 BOOST_ASSIGN_V2_CHECK_EQUAL( w.unwrap(), a );
             }
         }


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