|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69428 - in sandbox/assign_v2: boost/assign/v2/detail/functor libs/assign/v2/test/put libs/assign/v2/test/put/deque
From: erwann.rogard_at_[hidden]
Date: 2011-02-28 20:53:42
Author: e_r
Date: 2011-02-28 20:53:34 EST (Mon, 28 Feb 2011)
New Revision: 69428
URL: http://svn.boost.org/trac/boost/changeset/69428
Log:
upd assign_v2
Text files modified:
sandbox/assign_v2/boost/assign/v2/detail/functor/constructor.hpp | 2 +-
sandbox/assign_v2/libs/assign/v2/test/put/deque.cpp | 2 ++
sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp | 34 +++++++++++-----------------------
3 files changed, 14 insertions(+), 24 deletions(-)
Modified: sandbox/assign_v2/boost/assign/v2/detail/functor/constructor.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/detail/functor/constructor.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/detail/functor/constructor.hpp 2011-02-28 20:53:34 EST (Mon, 28 Feb 2011)
@@ -46,7 +46,6 @@
constructor(){}
- T operator()()const{ return T(); }
#if BOOST_ASSIGN_V2_ENABLE_CPP0X
template<typename... Args>
@@ -62,6 +61,7 @@
public:
using super_::operator();
+ T operator()()const{ return T(); }
#define BOOST_ASSIGN_V2_MACRO(z,N,data) \
template<BOOST_PP_ENUM_PARAMS(N,typename T)> \
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-02-28 20:53:34 EST (Mon, 28 Feb 2011)
@@ -11,6 +11,7 @@
#include <libs/assign/v2/test/put/deque/functor.h>
#include <libs/assign/v2/test/put/deque/modulo.h>
#include <libs/assign/v2/test/put/deque/std.h>
+#include <libs/assign/v2/test/put/deque/ext.h>
#include <libs/assign/v2/test/put/deque.h>
namespace test_assign_v2{
@@ -23,6 +24,7 @@
xxx_functor::test();
xxx_modulo::test();
xxx_std::test();
+ xxx_ext::test();
}
}// xxx_deque
Modified: sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp 2011-02-28 20:53:34 EST (Mon, 28 Feb 2011)
@@ -9,11 +9,11 @@
//////////////////////////////////////////////////////////////////////////////
#include <string>
#include <boost/typeof/typeof.hpp>
+#include <boost/lambda/lambda.hpp>
#include <boost/range/size.hpp>
#include <boost/assign/v2/detail/config/check.hpp>
#include <boost/assign/v2/put/deque.hpp>
-#include <boost/assign/v2/put/std/push_front.hpp>
-#include <boost/assign/v2/put/ext.hpp>
+#include <boost/assign/v2/put/modulo/fun.hpp>
#include <libs/assign/v2/test/put/deque/modulo.h>
@@ -22,35 +22,23 @@
namespace xxx_deque{
namespace xxx_modulo{
- // Tests interaction between different functionalities
-
void test(){
namespace as2 = boost::assign::v2;
+ namespace lambda = boost::lambda;
{
- //[put_deque_modulo_front
- BOOST_AUTO(
- cont, (
- as2::deque<int>( as2::_nil ) % as2::_push_front
- )( -1 )( 0 )( 1 )
- );
- BOOST_ASSIGN_V2_CHECK( cont.front() == 1 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == -1 );
- //]
- BOOST_ASSIGN_V2_CHECK( boost::size( cont ) == 3 );
- }
- {
- //[put_deque_modulo_repeat
+ //[put_deque_modulo
+ typedef int T; T x = 1, y = 2, z = 0;
BOOST_AUTO(
- cont, (
- as2::deque<int>( as2::_nil ) % ( as2::_repeat = 2 )
- )( -1 )( 0 )( 1 )
+ cont,
+ (
+ as2::deque<T>( as2::_nil ) % ( as2::_fun = ( lambda::_1 + 1 ) )
+ )( x )( y )( z )
);
- BOOST_ASSIGN_V2_CHECK( boost::size( cont ) == 6 );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == ( x + 1 ) );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == ( z + 1 ) );
//]
- BOOST_ASSIGN_V2_CHECK( cont.front() == -1 );
- BOOST_ASSIGN_V2_CHECK( cont.back() == 1 );
}
}
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