Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69085 - in sandbox/assign_v2: boost/assign/v2/detail/traits/type boost/assign/v2/put/pipe/functor/cpp0x boost/assign/v2/ref/array boost/assign/v2/ref/list/array libs/assign/v2/src libs/assign/v2/test/put/container libs/assign/v2/test/ref
From: erwann.rogard_at_[hidden]
Date: 2011-02-20 12:45:44


Author: e_r
Date: 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
New Revision: 69085
URL: http://svn.boost.org/trac/boost/changeset/69085

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/detail/traits/type/meta_convert.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/pipe/functor/cpp0x/forward.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/array/size_type.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp | 3
   sandbox/assign_v2/libs/assign/v2/src/main.cpp | 3 -
   sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp | 3
   sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp | 2
   sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp | 88 ++++++++++++++++++++++-----------------
   8 files changed, 58 insertions(+), 47 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/detail/traits/type/meta_convert.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/detail/traits/type/meta_convert.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/detail/traits/type/meta_convert.hpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -14,7 +14,7 @@
 #include <boost/assign/v2/ref/convert_traits/reference.hpp>
 
 namespace boost{
- struct boost::use_default;
+// struct boost::use_default; // according to compiler already declared
 namespace assign{
 namespace v2{
 namespace type_traits{

Modified: sandbox/assign_v2/boost/assign/v2/put/pipe/functor/cpp0x/forward.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/pipe/functor/cpp0x/forward.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/pipe/functor/cpp0x/forward.hpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -29,7 +29,7 @@
         ::boost::mpl::er2010::indices<I, Values...>
     )
     {
- f( get<Values>( t )... );
+ f( ref::get<Values>( t )... );
     }
 
     template<typename F, typename ...Args>

Modified: sandbox/assign_v2/boost/assign/v2/ref/array/size_type.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/array/size_type.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/array/size_type.hpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -25,4 +25,4 @@
 }// assign
 }// boost
 
-#endif BOOST_ASSIGN_V2_REF_ARRAY_SIZE_TYPE_ER_2010_HPP
+#endif // BOOST_ASSIGN_V2_REF_ARRAY_SIZE_TYPE_ER_2010_HPP

Modified: sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/list/array/rebind.hpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -49,7 +49,8 @@
     )
     {
         typedef ::boost::mpl::int_<K-1> index_;
- a[ K - 1 ].rebind( at<K-1>( l ) ) ;
+ // GCC4.4 wants fully qual at
+ a[ K - 1 ].rebind( ref::at<K-1>( l ) ) ;
         typedef index_ next_size_;
         typedef ::boost::mpl::int_<0> zero_;
         typedef typename ::boost::mpl::equal_to<next_size_,zero_>::type exit_;

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-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -6,12 +6,10 @@
 #include <libs/assign/v2/test/utility.h>
 #include <libs/assign/v2/test/other.h>
 
-
 // Speed
 //#include <fstream>
 //#include <libs/assign/v2/speed/put_ref.h>
 
-
 int main (int argc, char * const argv[])
 {
 
@@ -24,7 +22,6 @@
         xxx_utility::test();
         xxx_other::test();
     }
-
 /*
     {
         using namespace speed_assign_v2;

Modified: sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/container/functor.cpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -131,7 +131,8 @@
             //[default_constr2
             typedef std::string a_; typedef int b_;
             typedef boost::tuple<a_, b_> T;
- a_ a0 = "jan", a1 = "feb", a2 = "mar"; b_ b0 = 31, b1 = 28, b2 = 31;
+ a_ a0 = "jan", a1 = "feb", a2 = "mar";
+ b_ b0 = 31; //, b1 = 28, b2 = 31;
             std::vector<T> seq; as2::put( seq )( a0, b0 )()( a2 );
             BOOST_ASSIGN_V2_CHECK( get<0>( seq[0] ) == a0 );
             BOOST_ASSIGN_V2_CHECK( get<1>( seq[0] ) == b0 );

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/list.cpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -53,6 +53,8 @@
                 boost::mpl::vector<r0_, r1_, r2_>
>::type ar_;
             ar_ ar = as2::ref::list<tag_>( as2::_nil )( a )( B )( c );
+ // TODO GCC4.4 wants fully qual
+ // using namespace as2::ref;
             BOOST_ASSIGN_V2_CHECK( &as2::ref::at<0>( ar ) == &a );
             BOOST_ASSIGN_V2_CHECK( as2::ref::at<1>( ar ) == B );
             BOOST_ASSIGN_V2_CHECK( str_( as2::ref::at<2>( ar ) ) == c );

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/list_tuple.cpp 2011-02-20 12:45:38 EST (Sun, 20 Feb 2011)
@@ -11,6 +11,7 @@
 #include <string>
 #include <boost/mpl/vector/vector0.hpp>
 #include <boost/mpl/vector/vector10.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/ref/list_tuple.hpp>
 
 #include <boost/type_traits/add_reference.hpp>
@@ -21,9 +22,14 @@
 
     void test()
     {
- using namespace boost;
- using namespace assign::v2;
- namespace ns = ref::list_tuple_aux;
+ namespace as2 = boost::assign::v2;
+
+ #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+ #define BOOST_ASSIGN_V2_USING_GET using as2::ref::get;
+ #else
+ #define BOOST_ASSIGN_V2_USING_GET using boost::get;
+ #endif
+
         typedef boost::mpl::int_<0> i0_;
         typedef boost::mpl::int_<1> i1_;
         typedef boost::mpl::int_<2> i2_;
@@ -34,12 +40,10 @@
         int a = A;
         int b = B;
 #if BOOST_ASSIGN_V2_ENABLE_CPP0X
- using namespace ref; //get
             typedef int& lvalue_;
             typedef int const& clvalue_;
             typedef int rvalue_;
 #else
- using namespace boost; //get
             typedef int lvalue_;
             typedef int const clvalue_;
             typedef int const rvalue_;
@@ -47,7 +51,7 @@
         {
             typedef boost::mpl::vector0<> v0_;
 
- typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef as2::ref::nth_result_of::list_tuple meta_result_;
             typedef boost::mpl::vector2<
                 v0_,
                 v0_
@@ -58,14 +62,14 @@
                 input_
>::type result_;
 
- result_ list = ref::list_tuple()();
+ result_ list = as2::ref::list_tuple()();
 
         }
         {
             typedef boost::mpl::vector1<lvalue_> v0_;
             typedef boost::mpl::vector1<rvalue_> v1_;
 
- typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef as2::ref::nth_result_of::list_tuple meta_result_;
             typedef boost::mpl::vector4<
                 v0_,
                 v1_,
@@ -78,11 +82,12 @@
                 input_
>::type result_;
 
- result_ list = ref::list_tuple( a )( A )( b )( B );
- assert( &get<0>( list.get( i0_() ) ) == &a );
- assert( get<0>( list.get( i1_() ) ) == A );
- assert( &get<0>( list.get( i2_() ) ) == &b );
- assert( get<0>( list.get( i3_() ) ) == B );
+ result_ list = as2::ref::list_tuple( a )( A )( b )( B );
+ BOOST_ASSIGN_V2_USING_GET
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
+ BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i1_() ) ) == A );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i2_() ) ) == &b );
+ BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i3_() ) ) == B );
 
         }
         {
@@ -91,7 +96,7 @@
             typedef boost::mpl::vector2<rvalue_, lvalue_> v2_;
             typedef boost::mpl::vector2<rvalue_, rvalue_> v3_;
 
- typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef as2::ref::nth_result_of::list_tuple meta_result_;
             typedef boost::mpl::vector4<
                 v0_,
                 v1_,
@@ -104,15 +109,17 @@
                 input_
>::type result_;
 
- result_ list = ref::list_tuple( a, b )( a, B )( A, b )( A, B );
- assert( &get<0>( list.get( i0_() ) ) == &a );
- assert( &get<1>( list.get( i0_() ) ) == &b );
- assert( &get<0>( list.get( i1_() ) ) == &a );
- assert( get<1>( list.get( i1_() ) ) == B );
- assert( get<0>( list.get( i2_() ) ) == A );
- assert( &get<1>( list.get( i2_() ) ) == &b );
- assert( get<0>( list.get( i3_() ) ) == A );
- assert( get<1>( list.get( i3_() ) ) == B );
+ result_ list
+ = as2::ref::list_tuple( a, b )( a, B )( A, b )( A, B );
+ BOOST_ASSIGN_V2_USING_GET
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i0_() ) ) == &b );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i1_() ) ) == &a );
+ BOOST_ASSIGN_V2_CHECK( get<1>( list.get( i1_() ) ) == B );
+ BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i2_() ) ) == A );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i2_() ) ) == &b );
+ BOOST_ASSIGN_V2_CHECK( get<0>( list.get( i3_() ) ) == A );
+ BOOST_ASSIGN_V2_CHECK( get<1>( list.get( i3_() ) ) == B );
 
         }
         {
@@ -121,7 +128,7 @@
             typedef boost::mpl::vector2<clvalue_, lvalue_> v2_;
             typedef boost::mpl::vector2<clvalue_, clvalue_> v3_;
 
- typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef as2::ref::nth_result_of::list_tuple meta_result_;
             typedef boost::mpl::vector4<
                 v0_,
                 v1_,
@@ -138,16 +145,16 @@
             int const bb = B;
 
             result_ list
- = ref::list_tuple( a, b )( a, bb )( aa, b )( aa, bb );
- assert( &get<0>( list.get( i0_() ) ) == &a );
- assert( &get<1>( list.get( i0_() ) ) == &b );
- assert( &get<0>( list.get( i1_() ) ) == &a );
- assert( &get<1>( list.get( i1_() ) ) == &bb );
- assert( &get<0>( list.get( i2_() ) ) == &aa );
- assert( &get<1>( list.get( i2_() ) ) == &b );
- assert( &get<0>( list.get( i3_() ) ) == &aa );
- assert( &get<1>( list.get( i3_() ) ) == &bb );
-
+ = as2::ref::list_tuple( a, b )( a, bb )( aa, b )( aa, bb );
+ BOOST_ASSIGN_V2_USING_GET
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i0_() ) ) == &a );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i0_() ) ) == &b );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i1_() ) ) == &a );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i1_() ) ) == &bb );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i2_() ) ) == &aa );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i2_() ) ) == &b );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( list.get( i3_() ) ) == &aa );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( list.get( i3_() ) ) == &bb );
         }
 
         #undef A
@@ -163,17 +170,20 @@
             #endif
             typedef boost::mpl::vector1<type> v0_;
 
- typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef as2::ref::nth_result_of::list_tuple meta_result_;
             typedef boost::mpl::vector1<v0_> input_;
 
             typedef boost::mpl::apply1<meta_result_, input_>::type result_;
 
- result_ list = ref::list_tuple( "x" );
+ result_ list = as2::ref::list_tuple( "x" );
             typedef std::string str_;
- assert( str_( get<0>( list.get( i0_() ) ) ) == "x" );
- assert( str_( get<0>( list.get( i0_() ) ) ) != "y" );
+ BOOST_ASSIGN_V2_USING_GET
+ BOOST_ASSIGN_V2_CHECK(
+ str_( get<0>( list.get( i0_() ) ) ) == "x" );
+ BOOST_ASSIGN_V2_CHECK(
+ str_( get<0>( list.get( i0_() ) ) ) != "y" );
         }
-
+ #undef BOOST_ASSIGN_V2_USING_GET
     }// test
 
 }// xxx_list_tuple


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