|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72471 - in sandbox/assign_v2/libs/assign/v2: . test/deque test/support
From: erwann.rogard_at_[hidden]
Date: 2011-06-07 15:19:03
Author: e_r
Date: 2011-06-07 15:19:02 EDT (Tue, 07 Jun 2011)
New Revision: 72471
URL: http://svn.boost.org/trac/boost/changeset/72471
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_basic.cpp | 6 ++--
sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp | 50 ++++++++++++++++++++++-----------------
sandbox/assign_v2/libs/assign/v2/tutorial.cpp | 2
3 files changed, 32 insertions(+), 26 deletions(-)
Modified: sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_basic.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_basic.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/deque/csv_deque_basic.cpp 2011-06-07 15:19:02 EDT (Tue, 07 Jun 2011)
@@ -27,7 +27,7 @@
{
namespace as2 = boost::assign::v2;
{
- //[test_csv_deque_unary1
+ //[test_csv_deque_basic1
typedef as2::result_of::csv_deque<const char[2]>::type C1;
typedef as2::result_of::deque<char*>::type result1_;
typedef as2::result_of::csv_deque<std::string>::type C2;
@@ -49,7 +49,7 @@
//]
}
{
- //[test_csv_deque_unary2
+ //[test_csv_deque_basic2
typedef std::string T;
typedef as2::result_of::csv_deque<T>::type C;
@@ -68,7 +68,7 @@
//]
}
{
- //[test_csv_deque_unary3
+ //[test_csv_deque_basic3
typedef as2::result_of::csv_deque<int>::type C;
BOOST_MPL_ASSERT((
Modified: sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/support/functor.cpp 2011-06-07 15:19:02 EDT (Tue, 07 Jun 2011)
@@ -10,17 +10,23 @@
#include <boost/assign/v2/support/config/check.hpp>
#include <boost/assign/v2/support/config/enable_cpp0x.hpp>
#include <boost/assign/v2/support/functor/value.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <tuple>
+#else
#include <boost/tuple/tuple.hpp>
+#endif
#include <libs/assign/v2/test/support/functor.h>
namespace test_assign_v2{
namespace xxx_support{
namespace xxx_functor{
-
void test(){
namespace as2 = boost::assign::v2;
-#if !BOOST_ASSIGN_V2_ENABLE_CPP0X
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+ using namespace std;
+#else
+ using namespace boost;
// Requirement specific to this test file
#if BOOST_ASSIGN_V2_LIMIT_FUNCTOR_CONST_NON_CONST_ARITY != 2
#error
@@ -34,57 +40,57 @@
{
typedef int e_; e_ x = -1, y = 1;
- typedef boost::tuple<e_&, e_&> tuple_;
+ typedef tuple<e_&, e_&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, y ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( x, y ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, y ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( x, y ) ) == &y );
}
{
typedef int e_; e_ x = -1;
{
- typedef boost::tuple<e_&, e_ const&> tuple_;
+ typedef tuple<e_&, e_ const&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, 1 ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( value_()( x, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, 1 ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( get<1>( value_()( x, 1 ) ) == 1 );
}
{
- typedef boost::tuple< e_ const&, e_&> tuple_;
+ typedef tuple< e_ const&, e_&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( 1, x ) ) == 1 );
- BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( 1, x ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( get<0>( value_()( 1, x ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( 1, x ) ) == &x );
}
}
{
typedef int e_; e_ x = -1, y = 0, z = 1;
- typedef boost::tuple<e_&, e_&, e_&> tuple_;
+ typedef tuple<e_&, e_&, e_&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( &boost::get<0>( value_()( x, y, z ) ) == &x );
- BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( x, y, z ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( &get<0>( value_()( x, y, z ) ) == &x );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( x, y, z ) ) == &y );
}
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
{
typedef int e_; int y = 0;
- typedef boost::tuple<e_ const&, e_ &, e_ const&> tuple_;
+ typedef tuple<e_ const&, e_ &, e_ const&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( -1, y, 1 ) ) == -1 );
- BOOST_ASSIGN_V2_CHECK( &boost::get<1>( value_()( -1, y, 1 ) ) == &y );
- BOOST_ASSIGN_V2_CHECK( boost::get<2>( value_()( -1, y, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( value_()( -1, y, 1 ) ) == -1 );
+ BOOST_ASSIGN_V2_CHECK( &get<1>( value_()( -1, y, 1 ) ) == &y );
+ BOOST_ASSIGN_V2_CHECK( get<2>( value_()( -1, y, 1 ) ) == 1 );
}
#endif
{
typedef int e_;
- typedef boost::tuple<e_ const&, e_ const&, e_ const&> tuple_;
+ typedef tuple<e_ const&, e_ const&, e_ const&> tuple_;
typedef as2::functor_aux::value<tuple_> value_;
- BOOST_ASSIGN_V2_CHECK( boost::get<0>( value_()( -1, 0, 1 ) ) == -1 );
- BOOST_ASSIGN_V2_CHECK( boost::get<1>( value_()( -1, 0, 1 ) ) == 0 );
- BOOST_ASSIGN_V2_CHECK( boost::get<2>( value_()( -1, 0, 1 ) ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( value_()( -1, 0, 1 ) ) == -1 );
+ BOOST_ASSIGN_V2_CHECK( get<1>( value_()( -1, 0, 1 ) ) == 0 );
+ BOOST_ASSIGN_V2_CHECK( get<2>( value_()( -1, 0, 1 ) ) == 1 );
}
}
Modified: sandbox/assign_v2/libs/assign/v2/tutorial.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/tutorial.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/tutorial.cpp 2011-06-07 15:19:02 EDT (Tue, 07 Jun 2011)
@@ -187,7 +187,7 @@
{
//[tutorial_data
std::vector<double> exponent;
- /*<-*/typedef double(*fp)(double);/*->*/
+ /*<-*/typedef double(*fp)(double);//MSVC /*->*/
typedef function<double(double)> f_;
/*<<Equivalent to `exponent.push_back( double( log10( x ) ) )` for [^x = 1.0, ..., 10000.0]>>*/csv(
put( exponent ) % ( _data = f_( /*<-*/fp(/*->*/log10/*<-*/)/*->*/ ) )
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