Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69044 - in sandbox/assign_v2/libs/assign/v2/test/put: . deque ext ptr std
From: erwann.rogard_at_[hidden]
Date: 2011-02-19 06:00:42


Author: e_r
Date: 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
New Revision: 69044
URL: http://svn.boost.org/trac/boost/changeset/69044

Log:
upd assign_v2
Added:
   sandbox/assign_v2/libs/assign/v2/test/put/deque/
   sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/std.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/deque/std.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/ext/
   sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/frame.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/frame.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/ptr/
   sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.h (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/std/
   sandbox/assign_v2/libs/assign/v2/test/put/std/functor.cpp (contents, props changed)
   sandbox/assign_v2/libs/assign/v2/test/put/std/functor.h (contents, props changed)

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////
+// 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 <string>
+#include <boost/assign/v2/put/deque/csv.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+
+#include <libs/assign/v2/test/put/deque/csv.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_csv{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ {
+ //[csv_deque
+ typedef int T; T x = 1, y = 2, z = 0;
+ as2::result_of::deque<T>::type cont = as2::csv_deque( x, y, z );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == x );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == z );
+ //]
+ }
+ {
+ //[deque_str
+ typedef std::string str_;
+ BOOST_ASSIGN_V2_CHECK(
+ str_( as2::csv_deque( "x" )( "y" )( "z" )[1] ) == "y"
+ );
+ //]
+ }
+ }
+
+}// xxx_csv
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/csv.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_DEQUE_CSV_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_DEQUE_CSV_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_csv{
+
+ void test();
+
+}// xxx_csv
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,38 @@
+////////////////////////////////////////////////////////////////////////////
+// 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 <boost/assign/v2/put/deque/csv.hpp>
+#include <boost/assign/v2/put/deque/functor.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+
+#include <libs/assign/v2/test/put/deque/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_functor{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ {
+ //[deque
+ typedef int T; T x = 1, z = 0;
+ as2::result_of::deque<T>::type cont = as2::deque<T>( x )()( z );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == x );
+ BOOST_ASSIGN_V2_CHECK( cont[1] == T() );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == z );
+ //]
+ }
+ }
+
+}// xxx_functor
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/functor.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_DEQUE_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_DEQUE_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,60 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <string>
+#include <boost/typeof/typeof.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 <libs/assign/v2/test/put/deque/modulo.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_modulo{
+
+ // Tests interaction between different functionalities
+
+ void test(){
+
+ namespace as2 = boost::assign::v2;
+
+ {
+ //[deque_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 );
+ }
+ {
+ //[deque_repeat
+ BOOST_AUTO(
+ cont, (
+ as2::deque<int>( as2::_nil ) % ( as2::_repeat = 2 )
+ )( -1 )( 0 )( 1 )
+ );
+ BOOST_ASSIGN_V2_CHECK( boost::size( cont ) == 6 );
+ //]
+ BOOST_ASSIGN_V2_CHECK( cont.front() == -1 );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == 1 );
+ }
+ }
+
+}// xxx_modulo
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/modulo.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_DEQUE_MODULO_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_DEQUE_MODULO_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_modulo{
+
+ void test();
+
+}// xxx_modulo
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/std.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/std.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////
+// 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 <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/put/std/push_front.hpp>
+#include <boost/assign/v2/put/deque/functor.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <libs/assign/v2/test/put/deque/std.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_std{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ {
+ typedef int T; T x = 1, y = 2, z = 0;
+ //[deque_front
+ BOOST_AUTO(
+ cont,
+ (
+ as2::deque<T>( as2::_nil ) % as2::_push_front
+ )( x )( y )( z )
+ );
+ BOOST_ASSIGN_V2_CHECK( cont[0] == z );
+ BOOST_ASSIGN_V2_CHECK( cont[2] == x );
+ //]
+ }
+ }
+
+}// xxx_std
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/deque/std.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/deque/std.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_DEQUE_STD_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_DEQUE_STD_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+namespace xxx_std{
+
+ void test();
+
+}// xxx_std
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,62 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <vector>
+#include <map>
+#include <stack>
+#include <boost/lambda/lambda.hpp>
+#include <boost/array.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/put/ext.hpp>
+#include <boost/assign/v2/put/container/functor.hpp>
+#include <libs/assign/v2/test/put/ext/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_ext{
+namespace xxx_functor{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ namespace bl = boost::lambda;
+ {
+ //[iterate
+ boost::array<int, 3> cont;
+ ( as2::put( cont ) % as2::_iterate )( 1 )( 2 )( 3 );
+ BOOST_ASSIGN_V2_CHECK( cont[0] == 1 );
+ BOOST_ASSIGN_V2_CHECK( cont[2] == 3 );
+ //]
+ }
+ {
+ //[lookup
+ std::map<std::string, int> cont;
+ cont["jan"] = 31; cont["feb"] = 29; cont["mar"] = 32;
+ (
+ as2::put( cont ) % ( as2::_lookup = ( bl::_1 -= 1 ) )
+ )( "feb" )( "mar" );
+ BOOST_ASSIGN_V2_CHECK( cont["feb"] == 28 );
+ BOOST_ASSIGN_V2_CHECK( cont["mar"] == 31 );
+ //]
+ }
+ {
+ //[repeat
+ std::vector<int> cont;
+ ( as2::put( cont ) % ( as2::_repeat = 2 ) )( -1 )( 0 )( 1 );
+ BOOST_ASSIGN_V2_CHECK( cont.size() == 6 );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == -1 );
+ BOOST_ASSIGN_V2_CHECK( cont.back() == 1 );
+ //]
+ }
+ }
+
+}// xxx_functor
+}// xxx_ext
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ext/functor.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_EXT_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_EXT_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_ext{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_ext
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/frame.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/frame.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <boost/assign/v2/put/frame.hpp>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_frame{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+ // For now nothing
+ }
+
+}// xxx_frame
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/frame.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/frame.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_FRAME_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_FRAME_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_frame{
+
+ void test();
+
+}// xxx_frame
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,90 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <string>
+#include <boost/ptr_container/ptr_array.hpp>
+#include <boost/ptr_container/ptr_deque.hpp>
+#include <boost/ptr_container/ptr_list.hpp>
+#include <boost/ptr_container/ptr_map.hpp>
+#include <boost/ptr_container/ptr_set.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
+#include <boost/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/put/container/functor.hpp>
+
+#include <libs/assign/v2/test/put/ptr/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_ptr{
+namespace xxx_functor{
+
+ void test(){
+ namespace as2 = boost::assign::v2;
+ {
+ //[array
+ typedef int T;
+ T x = 1, y = 2, z = 3;
+ boost::ptr_array<T, 3> ar;
+ as2::put( ar )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( ar[0] == x );
+ BOOST_ASSIGN_V2_CHECK( ar[2] == z );
+ //]
+ }
+/*
+ {
+ //[map
+ boost::ptr_map<std::string, int> assoc;
+ as2::put( assoc )( "jan", 31 )( "feb", 28 )( "mar", 31 );
+ BOOST_ASSIGN_V2_CHECK( assoc["feb"] == 28 );
+ //]
+ }
+ {
+ //[set
+ typedef std::string T;
+ boost::ptr_set<T> assoc;
+ T x = "isomer", y = "ephemeral", z = "prosaic";
+ as2::put( assoc )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( assoc.count( x ) == 1 );
+ BOOST_ASSIGN_V2_CHECK( assoc.count( z ) == 1 );
+ //]
+ }
+*/
+ {
+ //[deque
+ typedef int T; T x = 1, y = 2, z = 0;
+ boost::ptr_deque<T> seq;
+ as2::put( seq )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( seq.front() == x );
+ BOOST_ASSIGN_V2_CHECK( seq.back() == z );
+ //]
+ }
+ {
+ //[list
+ typedef int T; T x = 1, y = 2, z = 0;
+ boost::ptr_list<T> seq;
+ ( as2::put( seq ) )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( seq.front() == x );
+ BOOST_ASSIGN_V2_CHECK( seq.back() == z );
+ //]
+ }
+ {
+ //[vector
+ typedef int T; T x = 1, y = 2, z = 0;
+ boost::ptr_vector<T> seq;
+ as2::put( seq )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( seq.front() == x );
+ BOOST_ASSIGN_V2_CHECK( seq.back() == z );
+ //]
+ }
+ }// test
+
+}// xxx_functor
+}// xxx_ptr
+}// xxx_put
+}// xxx_test_assign

Added: sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/ptr/functor.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_PTR_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PTR_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_ptr{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_ptr
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/assign_v2/libs/assign/v2/test/put/std/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/std/functor.cpp 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,42 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/assign/v2/detail/config/check.hpp>
+#include <boost/assign/v2/put/std/push_front.hpp>
+#include <boost/assign/v2/put/container/functor.hpp>
+#include <libs/assign/v2/test/put/std/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_std{
+namespace xxx_functor{
+
+ void test()
+ {
+ namespace as2 = boost::assign::v2;
+
+ /* Only have to check those that are in /std which are not in
+ /deduce/dependee.hpp */
+
+ {
+ //[std_deque
+ typedef int T; T x = 0, y = 2, z = 1;
+ std::deque<T> seq;
+ ( as2::put( seq ) % as2::_push_front )( x )( y )( z );
+ BOOST_ASSIGN_V2_CHECK( seq[0] == z );
+ BOOST_ASSIGN_V2_CHECK( seq[2] == x );
+ //]
+ }
+ }
+
+}// xxx_functor
+}// xxx_std
+}// xxx_put
+}// test_assign_v2

Added: sandbox/assign_v2/libs/assign/v2/test/put/std/functor.h
==============================================================================
--- (empty file)
+++ sandbox/assign_v2/libs/assign/v2/test/put/std/functor.h 2011-02-19 06:00:39 EST (Sat, 19 Feb 2011)
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_STD_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_STD_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_std{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_std
+}// xxx_put
+}// xxx_test_assign
+
+#endif


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