Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67814 - in sandbox/statistics/support/libs/assign/v2/test: . put put/pipe put/pipe/functor ref
From: erwann.rogard_at_[hidden]
Date: 2011-01-08 18:52:14


Author: e_r
Date: 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
New Revision: 67814
URL: http://svn.boost.org/trac/boost/changeset/67814

Log:
updating libs/assign/v2/test
Added:
   sandbox/statistics/support/libs/assign/v2/test/chain.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/chain.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/detail.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/convert.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/convert.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/deque.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/deque.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/modulo.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/modulo.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/
   sandbox/statistics/support/libs/assign/v2/test/put/pipe.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/array.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/array.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.h (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/type_traits.cpp (contents, props changed)
   sandbox/statistics/support/libs/assign/v2/test/type_traits.h (contents, props changed)

Added: sandbox/statistics/support/libs/assign/v2/test/chain.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/chain.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/chain/checking/twin_values.hpp>
+#include <boost/assign/v2/chain/checking/distinct_values.hpp>
+#include <libs/assign/v2/test/chain.h>
+
+namespace test_assign_v2{
+namespace xxx_chain{
+
+ void test()
+ {
+ using namespace boost::assign::v2::checking::chain;
+ twin_values::do_check<int>();
+ distinct_values::do_check<short>();
+ distinct_values::do_check<int>();
+ distinct_values::do_check<float>();
+ distinct_values::do_check<double>();
+ }
+
+}// xxx_chain
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/chain.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/chain.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_CHAIN_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_CHAIN_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_chain{
+
+ void test();
+
+}// xxx_chain
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/detail.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,143 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <iostream>
+#include <boost/preprocessor/arithmetic/sub.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/assign/v2/detail/config/tuple_limit_arity.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/functor/constructor.hpp>
+
+#include <boost/assign/v2/detail/config/enable_cpp0x.hpp>
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+// do nothing
+#else
+#include <boost/assign/v2/detail/config/limit_lvalue_const_arity.hpp>
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+#include <libs/assign/v2/test/detail.h>
+
+namespace test_assign_v2{
+namespace xxx_detail{
+
+ void test(){
+ using namespace boost::assign::v2;
+
+#if BOOST_ASSIGN_V2_ENABLE_CPP0X
+#define BOOST_ASSIGN_V2_n BOOST_ASSIGN_V2_CPP03_TUPLE_LIMIT_ARITY
+// That's because we are constructing a boost::tuple<>.
+#else
+#define BOOST_ASSIGN_V2_n BOOST_ASSIGN_V2_LIMIT_LVALUE_CONST_ARITY
+
+#if BOOST_ASSIGN_V2_n > BOOST_ASSIGN_V2_CPP03_TUPLE_LIMIT_ARITY
+#error
+#endif
+
+#endif // BOOST_ASSIGN_V2_ENABLE_CPP0X
+
+ {
+ typedef int& x_ref_;
+ typedef int const& y_ref_;
+ typedef int z_;
+
+#define MACRO(Z, n, data) data
+
+ typedef boost::tuple<
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ x_ref_
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_IF(BOOST_PP_DEC(BOOST_ASSIGN_V2_n),1,0),
+ MACRO,
+ y_ref_
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n,2),
+ MACRO,
+ z_
+ )
+ > t_;
+#undef MACRO
+
+ typedef functor_aux::constructor<t_> f_;
+ f_ f;
+
+ int x = -1;
+ int const y = 0;
+
+#define MACRO(z, n, data) data
+
+ t_ t = f(
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ x
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_IF(BOOST_PP_DEC(BOOST_ASSIGN_V2_n),1,0),
+ MACRO,
+ y
+ )
+ BOOST_PP_ENUM_TRAILING(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n, 2),
+ MACRO,
+ 1
+ )
+ );
+#undef MACRO
+ BOOST_PP_EXPR_IF(
+ BOOST_ASSIGN_V2_n,
+ BOOST_ASSIGN_V2_CHECK(
+ &boost::get<0>( t ) == &x
+ );
+ )
+ BOOST_PP_EXPR_IF(
+ BOOST_PP_DEC(BOOST_ASSIGN_V2_n),
+ BOOST_ASSIGN_V2_CHECK(
+ &boost::get<1>( t ) == &y
+ );
+ )
+
+#define MACRO(z, i, data ) \
+ BOOST_ASSIGN_V2_CHECK( \
+ boost::get< BOOST_PP_ADD(i,2) >( t ) == 1 \
+ ); \
+/**/
+
+ BOOST_PP_REPEAT(
+ BOOST_PP_SUB(BOOST_ASSIGN_V2_n,2),
+ MACRO,
+ ~
+ )
+#undef MACRO
+
+ typedef std::string str_;
+ const str_ cpp
+ = BOOST_ASSIGN_V2_ENABLE_CPP0X ? "C++0x" : "C++03";
+ const str_ str = str_("test_assign_v2::xxx_detail::xxx_functor")
+ + "{ " + cpp + ", arity = ";
+
+ std::cout
+ << str
+ << BOOST_ASSIGN_V2_n
+ << " }"
+ << std::endl;
+
+#undef BOOST_ASSIGN_V2_n
+ }
+ }
+
+}// xxx_detail
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/detail.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/detail.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_DETAIL_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_DETAIL_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_detail{
+
+ void test();
+
+}// xxx_detail
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 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 <libs/assign/v2/test/put/modulo.h>
+#include <libs/assign/v2/test/put/ptr.h>
+#include <libs/assign/v2/test/put/static.h>
+#include <libs/assign/v2/test/put/stl.h>
+#include <libs/assign/v2/test/put/tuple_refs.h>
+#include <libs/assign/v2/test/put/pipe.h>
+#include <libs/assign/v2/test/put/convert.h>
+#include <libs/assign/v2/test/put/deque.h>
+#include <libs/assign/v2/test/put.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+
+ void test(){
+
+ xxx_modulo::test();
+ xxx_ptr::test();
+ xxx_static::test();
+ xxx_stl::test();
+ xxx_tuple_refs::test();
+ xxx_deque::test();
+ xxx_pipe::test();
+ xxx_convert::test();
+
+ }
+
+}// xxx_put
+}// test_assign_v2
+

Added: sandbox/statistics/support/libs/assign/v2/test/put.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+
+ void test();
+
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/convert.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/convert.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,78 @@
+////////////////////////////////////////////////////////////////////////////
+// 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 <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <boost/array.hpp>
+
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/put/pipe/convert.hpp>
+
+#include <libs/assign/v2/test/put/convert.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_convert{
+
+ void test()
+ {
+ typedef std::vector<int> from_;
+ from_ from;
+ namespace as2 = boost::assign::v2;
+ namespace chk_cont = as2::checking::container;
+ {
+ using namespace as2::checking::constants;
+ from.push_back( a );
+ from.push_back( b );
+ from.push_back( c );
+ from.push_back( d );
+ from.push_back( e );
+ from.push_back( f );
+ from.push_back( g );
+ from.push_back( h );
+ }
+ {
+ typedef boost::array<int,8> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::deque<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::list<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::queue<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::set<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::stack<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ {
+ typedef std::vector<int> to_;
+ chk_cont::do_check( from | as2::put_convert<to_>() );
+ }
+ }
+
+}// xxx_convert
+}// xxx_put
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/put/convert.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/convert.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_CONVERT_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_CONVERT_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_convert{
+
+ void test();
+
+}// xxx_convert
+}// xxx_put
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/deque.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/deque.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,108 @@
+////////////////////////////////////////////////////////////////////////////
+// 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 <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <string>
+#include <boost/array.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/keyword.hpp>
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/detail/checking/relational_op.hpp>
+
+#include <boost/assign/v2/put/deque.hpp>
+
+#include <libs/assign/v2/test/put/deque.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+
+ void test()
+ {
+ using namespace boost::assign::v2;
+ {
+ // CSV
+ using namespace checking::constants;
+ using namespace checking::container;
+ do_check( csv_deque( a, b, c, d, e, f, g, h ) );
+ }
+ {
+ // Operator%
+ BOOST_AUTO(tmp, ( deque<int>( _nil ) % ( _repeat = 3 ) ) );
+ tmp( 1 );
+ BOOST_ASSIGN_V2_CHECK( boost::size( tmp ) == 3 );
+ BOOST_ASSIGN_V2_CHECK( tmp.front() == 1 );
+ BOOST_ASSIGN_V2_CHECK( tmp.back() == 1 );
+ }
+ {
+ // string literals
+ typedef std::string str_;
+ BOOST_ASSIGN_V2_CHECK( str_( csv_deque("x")[0] ) == "x");
+ }
+ {
+ // Conversion
+ typedef result_of::deque<int>::type deque_;
+ deque_ from;
+ {
+ using namespace checking::constants;
+ from = csv_deque( a, b, c, d, e, f, g, h );
+ }
+ using namespace checking::container;
+#define MACRO do_check( from | put_convert<to_>() );
+ {
+ typedef boost::array<int,8> to_;
+ MACRO
+ }
+ {
+ typedef std::deque<int> to_;
+ MACRO
+ }
+ {
+ typedef std::list<int> to_;
+ MACRO
+ }
+ {
+ typedef std::queue<int> to_;
+ MACRO
+ }
+ {
+ typedef std::set<int> to_;
+ MACRO
+ }
+ {
+ typedef std::stack<int> to_;
+ MACRO
+ }
+ {
+ typedef std::vector<int> to_;
+ MACRO
+ }
+#undef MACRO
+ }
+/*
+ { // Relational
+ using namespace checking::constants;
+ using namespace checking::relational_op;
+ do_check(
+ csv_deque( a, b, c, d, e, f, g, h )
+ );
+ }
+*/
+ }
+
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/put/deque.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/deque.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_DEQUE_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_DEQUE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_deque{
+
+ void test();
+
+}// xxx_deque
+}// xxx_put
+}// test_assign_v2
+
+#endif
\ No newline at end of file

Added: sandbox/statistics/support/libs/assign/v2/test/put/modulo.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/modulo.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,41 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <queue>
+#include <map>
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/put.hpp>
+#include <libs/assign/v2/test/put/modulo.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_modulo{
+
+ void test()
+ {
+ using namespace boost::assign::v2;
+ using namespace checking::constants;
+ namespace chk_cont = checking::container;
+ { // Queue + Repeat
+ typedef std::queue<int> cont_;
+ cont_ cont;
+ ( put( cont ) % ( _repeat = 3 ) )( -1 );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == -1); cont.pop();
+ BOOST_ASSIGN_V2_CHECK( cont.front() == -1); cont.pop();
+ BOOST_ASSIGN_V2_CHECK( cont.front() == -1); cont.pop();
+ BOOST_ASSIGN_V2_CHECK( cont.empty() == true);
+ }
+ }
+
+}// xxx_modulo
+}// xxx_put
+}// test_assign_v2
+
+

Added: sandbox/statistics/support/libs/assign/v2/test/put/modulo.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/modulo.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_MODULO_OP_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_MODULO_OP_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_modulo{
+
+ void test();
+
+}// xxx_modulo
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <libs/assign/v2/test/put/pipe/csv.h>
+#include <libs/assign/v2/test/put/pipe/forward_pars.h>
+#include <libs/assign/v2/test/put/pipe/functor.h>
+#include <libs/assign/v2/test/put/pipe/stl.h>
+#include <libs/assign/v2/test/put/pipe/ext.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+
+ void test(){
+ xxx_csv::test();
+ xxx_forward_pars::test();
+ xxx_functor::test();
+ xxx_stl::test();
+ xxx_ext::test();
+ }
+
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+
+ void test();
+
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,82 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <iostream>
+#include <boost/preprocessor/expr_if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/put/pipe/csv.hpp>
+
+#include <libs/assign/v2/test/put/pipe/csv.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_csv{
+
+ void test(){
+ using namespace boost;
+ using namespace boost::assign::v2;
+ using namespace checking::constants;
+
+ typedef boost::mpl::int_<0> zero_;
+ using namespace boost::assign::v2;
+ int a1, b1, c1, d1;//, e1, f1, g1, h1;
+ using namespace checking::constants;
+ {
+ a1 = a; b1 = b; c1 = c; d1 = d;
+ }
+
+#define MACRO1(i) tmp.seq_args()[ i ]
+#define MACRO2(i,X) BOOST_ASSIGN_V2_CHECK( &X == &MACRO1(i) );
+#define MACRO3(i,X) BOOST_ASSIGN_V2_CHECK( X == MACRO1(i) );
+
+ {
+ BOOST_AUTO(
+ tmp,
+ ( _csv_put( a1, b1, c1 ) )
+ );
+ MACRO2(0, a1)
+ MACRO2(1, b1)
+ MACRO2(2, c1)
+ }
+ {
+ BOOST_AUTO(
+ tmp,
+ ( _csv_put( a1, b1, c ) )
+ );
+ MACRO2(0, a1)
+ MACRO2(1, b1)
+ MACRO2(2, c)
+ }
+#define C -10
+ {
+ BOOST_AUTO(
+ tmp,
+ ( _csv_put( a1, b, C ) )
+ );
+ MACRO2(0, a1)
+ MACRO2(1, b)
+ MACRO3(2, C)
+ }
+
+#undef C
+#undef MACRO1
+#undef MACRO2
+#undef MACRO3
+
+ }
+
+}// xxx_csv
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/csv.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_CSV_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_CSV_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_csv{
+
+ void test();
+
+}// xxx_csv
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,83 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <map>
+#include <deque>
+#include <string>
+
+#include <boost/lambda/lambda.hpp>
+
+#include <boost/assign/v2/put/pipe.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/put/modifier/ext/lookup.hpp>
+#include <boost/assign/v2/put/modifier/ext/repeat.hpp>
+#include <boost/assign/v2/put/modifier/ext/iterate.hpp>
+#include <libs/assign/v2/test/put/pipe/ext.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_ext{
+
+ void test(){
+
+ // This test is also about string literals
+
+ namespace as2 = boost::assign::v2;
+ namespace bl = boost::lambda;
+ {
+ //[lookup
+ std::map<const char*,int> cont;
+ cont["x"] = -1; cont["y"] = 0; cont["z"] = 1;
+ cont | (
+ as2::_csv_put % ( as2::_lookup = ( bl::_1 +=2 ) )
+ )( "z", "x", "y" );
+ //]
+ BOOST_ASSIGN_V2_CHECK( cont["y"] == 2 );
+ BOOST_ASSIGN_V2_CHECK( cont["x"] == 1 );
+ BOOST_ASSIGN_V2_CHECK( cont["z"] == 3 );
+ }
+ typedef std::string str_;
+ {
+ //[lookup2
+ std::deque<const char*> cont;
+ cont | as2::_put( "x" )( "y" )( "z" );
+ //]
+ BOOST_ASSIGN_V2_CHECK( str_( cont[0] ) == "x" );
+ BOOST_ASSIGN_V2_CHECK( str_( cont[1] ) == "y" );
+ BOOST_ASSIGN_V2_CHECK( str_( cont[2] ) == "z" );
+ }
+ {
+ std::deque<int> cont;
+ cont | (
+ as2::_csv_put % ( as2::_repeat = 2 )
+ )( -1, 0, 1 );
+ BOOST_ASSIGN_V2_CHECK( cont[0] == -1 );
+ BOOST_ASSIGN_V2_CHECK( cont[1] == -1 );
+ BOOST_ASSIGN_V2_CHECK( cont[2] == 0 );
+ BOOST_ASSIGN_V2_CHECK( cont[3] == 0 );
+ BOOST_ASSIGN_V2_CHECK( cont[4] == 1 );
+ BOOST_ASSIGN_V2_CHECK( cont[5] == 1 );
+ }
+ {
+ std::deque<int> cont(3);
+ cont[0] = -1;
+ cont | (
+ as2::_csv_put % ( as2::_iterate = 1 )
+ )( 0, 1 );
+ BOOST_ASSIGN_V2_CHECK( cont[0] == -1 );
+ BOOST_ASSIGN_V2_CHECK( cont[1] == 0 );
+ BOOST_ASSIGN_V2_CHECK( cont[2] == 1 );
+ }
+ }
+
+}// xxx_ext
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/ext.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_EXT_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_EXT_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_ext{
+
+ void test();
+
+}// xxx_ext
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 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 <list>
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/assign/v2/detail/functor/identity.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/put/modifier/std/push_front.hpp>
+#include <boost/assign/v2/put/generic.hpp>
+#include <boost/assign/v2/put/sub.hpp>
+#include <boost/assign/v2/put/generic/new_fun.hpp>
+#include <boost/assign/v2/put/generic/new_modifier.hpp>
+#include <boost/assign/v2/put/pipe/functor.hpp>
+#include <boost/assign/v2/put/pipe/forward_pars.hpp>
+
+#include <libs/assign/v2/test/put/pipe/forward_pars.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_forward_pars{
+
+ void test()
+ {
+ using namespace boost::assign::v2;
+ typedef std::list<int> cont_;
+ cont_ cont;
+ typedef modifier_tag::push_front modifier_tag_;
+ typedef functor_aux::identity identity_;
+ typedef put_aux::new_fun<identity_> fun_;
+ typedef put_aux::set_modifier<modifier_tag_> modifier_;
+ typedef boost::mpl::vector2<
+ fun_,
+ modifier_
+ > pars_;
+ put_pipe_aux::forward_pars<pars_>(
+ put( cont ),
+ (
+ _put % (
+ _fun = _identity
+ ) % ( _modifier = modifier_tag_() )
+ ).pars()
+ )( 1 )( 2 )( 3 );
+ BOOST_ASSIGN_V2_CHECK( cont.size() == 3 );
+ BOOST_ASSIGN_V2_CHECK( cont.front() == 3 ); cont.pop_front();
+ BOOST_ASSIGN_V2_CHECK( cont.front() == 2 ); cont.pop_front();
+ BOOST_ASSIGN_V2_CHECK( cont.front() == 1 ); cont.pop_front();
+ }
+
+}// xxx_forward_pars
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/forward_pars.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_FORWARD_PARS_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FORWARD_PARS__ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_forward_pars{
+
+ void test();
+
+}// xxx_forward_pars
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <libs/assign/v2/test/put/pipe/functor/container.h>
+#include <libs/assign/v2/test/put/pipe/functor/forward.h>
+#include <libs/assign/v2/test/put/pipe/functor.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+
+ void test(){
+ xxx_container::test();
+ xxx_forward::test();
+ }
+
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_FUNCTOR_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FUNCTOR_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+
+ void test();
+
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,134 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/mpl/int.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/put/modifier/ext/repeat.hpp>
+#include <boost/assign/v2/put/pipe/functor.hpp>
+#include <libs/assign/v2/test/put/pipe/functor/container.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_container{
+
+ struct val_pred{
+
+ val_pred(){}
+ template<typename T, typename U>
+ void operator()(T const& t, U const& u)const
+ {
+ BOOST_ASSIGN_V2_CHECK( t == u );
+ }
+ };
+
+ struct ref_pred{
+
+ ref_pred(){}
+ template<typename T, typename U>
+ void operator()(T const& t, U const& u)const
+ {
+ BOOST_ASSIGN_V2_CHECK( &t == &u );
+ }
+ };
+
+ template<int i, int j, typename T, typename P, typename U>
+ void local_assert(T& tmp, P const& pred, U const& u)
+ {
+
+ using namespace boost;
+ pred(
+ get<j>(
+ tmp.seq_args().get( boost::mpl::int_<i>() )
+ ),
+ u
+ );
+ }
+
+ void test()
+ {
+
+ using namespace boost;
+ using namespace boost::assign::v2;
+ using namespace checking::constants;
+
+ typedef boost::mpl::int_<0> zero_;
+ {
+ typedef put_pipe_aux::container<> container_;
+ int x = -1;
+ BOOST_AUTO(
+ tmp,
+ ( ( container_() % ( _repeat = 3 ) )( x ) )
+ );
+ int n = tmp
+ .pars()
+ .static_lookup( zero_() ).get();
+ BOOST_ASSIGN_V2_CHECK( n == 3 );
+ }
+ {
+ #define A -10
+ #define B 10
+ int a1, b1, c1;
+ using namespace checking::constants;
+ {
+ a1 = a; b1 = b; c1 = c;
+ }
+
+ BOOST_AUTO(
+ tmp,
+ ( _put
+ ( a1, b1 )( a1, b )( a1, B )
+ ( a, b1 )( a, b )( a, B )
+ ( A, b1 )( A, b )( A, B )
+ ( a1 )
+ ( a )
+ ( A )
+ ()
+ )
+ );
+ local_assert<0, 0>( tmp, ref_pred(), a1);
+ local_assert<0, 1>( tmp, ref_pred(), b1);
+ local_assert<1, 0>( tmp, ref_pred(), a1); local_assert<1, 1>( tmp, ref_pred(), b);
+ local_assert<2, 0>( tmp, ref_pred(), a1); local_assert<2, 1>( tmp, val_pred(), B);
+
+ local_assert<3, 0>( tmp, ref_pred(), a ); local_assert<3, 1>( tmp, ref_pred(), b1);
+ local_assert<4, 0>( tmp, ref_pred(), a ); local_assert<4, 1>( tmp, ref_pred(), b);
+ local_assert<5, 0>( tmp, ref_pred(), a ); local_assert<5, 1>( tmp, val_pred(), B);
+
+ local_assert<6, 0>( tmp, val_pred(), A); local_assert<6, 1>( tmp, ref_pred(), b1);
+ local_assert<7, 0>( tmp, val_pred(), A); local_assert<7, 1>( tmp, ref_pred(), b);
+ local_assert<8, 0>( tmp, val_pred(), A); local_assert<8, 1>( tmp, val_pred(), B);
+
+ local_assert<9, 0>( tmp, ref_pred(), a1);
+ local_assert<10, 0>( tmp, ref_pred(), a);
+ local_assert<11, 0>( tmp, val_pred(), A);
+
+#undef A
+#undef B
+ }
+ {
+ BOOST_AUTO(tmp, _put( "x" ) );
+ typedef boost::mpl::int_<0> int_;
+ typedef std::string str_;
+ BOOST_ASSIGN_V2_CHECK(
+ str_( get<0>( tmp.seq_args().get( int_() ) ) ) == "x"
+ );
+ }
+ }
+
+
+}// xxx_container
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/container.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,27 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PIPE_FUNCTOR_CONTAINER_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_FUNCTOR_CONTAINER_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_container{
+
+ void test();
+
+}// xxx_container
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,63 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <vector>
+#include <string>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/ref/list_tuple/container.hpp>
+#include <boost/assign/v2/put/sub.hpp>
+#include <boost/assign/v2/put/pipe/functor/forward.hpp>
+#include <libs/assign/v2/test/put/pipe/functor/forward.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_forward{
+
+ void test()
+ {
+
+ using namespace boost::assign::v2;
+ int a1, b1, c1, d1;//, e1, f1, g1, h1;
+ {
+ using namespace checking::constants;
+ a1 = a; b1 = b; c1 = c; d1 = d;
+ }
+ using namespace put_pipe_aux;
+ {
+ std::vector<int> cont;
+ BOOST_AUTO( lhs, ( put( cont ) ) );
+ forward(
+ lhs,
+ ref::list_tuple( a1 )( b1 )( c1 )( d1 )()
+ );
+ BOOST_ASSIGN_V2_CHECK( cont[0] == a1 );
+ BOOST_ASSIGN_V2_CHECK( cont[1] == b1 );
+ BOOST_ASSIGN_V2_CHECK( cont[2] == c1 );
+ BOOST_ASSIGN_V2_CHECK( cont[3] == d1 );
+ BOOST_ASSIGN_V2_CHECK( cont.size() == 5 );
+ }
+ {
+ std::deque<const char*> cont;
+ BOOST_AUTO( lhs, put( cont ) );
+ forward( lhs, ref::list_tuple( "x" ) );
+ typedef std::string str_;
+ BOOST_ASSIGN_V2_CHECK( str_( cont[0] ) == "x" );
+ }
+ }
+
+}// xxx_forward
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/functor/forward.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_PUT_PIPE_FUNCTOR_FORWARD_H
+#define LIBS_ASSIGN_V2_PUT_PIPE_FUNCTOR_FORWARD_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_functor{
+namespace xxx_forward{
+
+ void test();
+
+}// xxx_forward
+}// xxx_functor
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+
+#endif // LIBS_ASSIGN_V2_PUT_FUNCTOR_FORWARD_H

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,151 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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/array.hpp>
+#include <deque>
+#include <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/put/pipe.hpp>
+
+#include <libs/assign/v2/test/put/pipe/stl.h>
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_stl{
+
+ void test(){
+ using namespace boost::assign::v2;
+ using namespace checking::container;
+ using namespace checking::constants;
+ { // Array
+
+ typedef boost::array<int,8> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont | _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ {
+ cont_ cont;
+ do_check(
+ cont | _csv_put( a, b, c, d, e, f, g, h )
+ );
+ }
+ }
+ { // Associative
+ {
+ typedef std::map<int, int> cont_;
+ cont_ cont;
+ {
+ do_check(
+ cont |
+ _put( a, a )( b, b )( c, c )
+ ( d, d )( e, e )( f, f )
+ ( g, g )( h, h )
+ );
+ }
+ }// map
+ {
+ typedef std::set<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont |
+ _put( a )( b )( c )
+ ( d )( e )( f )
+ ( g )( h )
+ );
+ }
+ {
+ cont_ cont;
+ do_check( cont | _csv_put( a, b, c, d, e, f, g, h ) );
+ }
+ }// map
+ }// Associative
+ {
+ // Sequence
+ {
+ typedef std::deque<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont | _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ {
+ cont_ cont;
+ do_check( cont | _csv_put( a, b, c, d, e, f, g, h ) );
+ }
+ }// deque
+ {
+ typedef std::list<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont | _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ }// list
+ {
+ typedef std::vector<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont |
+ _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ }// vector
+ } // Sequence
+ {
+ // Push
+ {
+ typedef std::queue<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont |
+ _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ {
+ cont_ cont;
+ do_check( cont | _csv_put( a, b, c, d, e, f, g, h ) );
+ }
+ }// queue
+ // Push
+ {
+ typedef std::stack<int> cont_;
+ {
+ cont_ cont;
+ do_check(
+ cont | _put( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+ {
+ cont_ cont;
+ do_check( cont | _csv_put( a, b, c, d, e, f, g, h ) );
+ }
+ }// queue
+ }// Push
+ }// test()
+
+}// xxx_stl
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/put/pipe/stl.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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_PIPE_STL_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_PUT_PIPE_STL_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_put{
+namespace xxx_pipe{
+namespace xxx_stl{
+
+ void test();
+
+}// xxx_stl
+}// xxx_pipe
+}// xxx_put
+}// xxx_test_assign
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/ref.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,33 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <libs/assign/v2/test/ref/array.h>
+#include <libs/assign/v2/test/ref/convert_traits.h>
+#include <libs/assign/v2/test/ref/csv_array.h>
+#include <libs/assign/v2/test/ref/fusion.h>
+#include <libs/assign/v2/test/ref/list_tuple.h>
+#include <libs/assign/v2/test/ref/wrapper.h>
+#include <libs/assign/v2/test/ref.h>
+
+namespace test_assign_v2{
+namespace xxx_ref{
+
+ void test(){
+
+ xxx_array::test();
+ xxx_convert_traits::test();
+ xxx_csv_array::test();
+ xxx_fusion::test();
+ xxx_list_tuple::test();
+ xxx_wrapper::test();
+
+ }
+
+}// xxx_ref
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/ref.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_REF_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_REF_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_ref{
+
+ void test();
+
+}// xxx_ref
+}// test_assign_v2
+
+#endif

Added: sandbox/statistics/support/libs/assign/v2/test/ref/array.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/array.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,133 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <list>
+#include <map>
+#include <queue>
+#include <set>
+#include <stack>
+#include <vector>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/checking/check.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/detail/checking/container.hpp>
+#include <boost/assign/v2/detail/checking/array.hpp>
+#include <boost/assign/v2/detail/checking/relational_op.hpp>
+#include <boost/assign/v2/put/pipe/convert.hpp>
+#include <boost/assign/v2/ref/array/functor.hpp>
+#include <boost/assign/v2/ref/wrapper/copy.hpp>
+#include <libs/assign/v2/test/ref/array.h>
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_array{
+
+ void test()
+ {
+ using namespace boost::assign::v2;
+ {
+ // Array
+ typedef ref::nth_result_of::array<8, int const>::type ar_;
+ using namespace checking::constants;
+ ar_ ar = ref::array( a )( b )( c )( d )( e )( f )( g )( h );
+ {
+ using namespace checking;
+ typedef container_tag::static_array tag_;
+ do_check(tag_(), ar );
+ }
+ }
+ {
+ // Assignement of references
+ int a1, b1, c1, d1, e1, f1, g1, h1;
+ typedef std::vector<int> vec_;
+ vec_ vec;
+ {
+ using namespace checking::constants;
+ vec.push_back( a );
+ vec.push_back( b );
+ vec.push_back( c );
+ vec.push_back( d );
+ vec.push_back( e );
+ vec.push_back( f );
+ vec.push_back( g );
+ vec.push_back( h );
+ }
+ boost::copy(
+ vec,
+ boost::begin( ref::array
+ ( a1 )( b1 )( c1 )( d1 )( e1 )( f1 )( g1 )( h1 )
+ )
+ );
+ {
+ using namespace checking::container;
+ do_check( ref::array<int const>
+ ( a1 )( b1 )( c1 )( d1 )( e1 )( f1 )( g1 )( h1 )
+ );
+ }
+ }
+#define MACRO do_check( from | put_convert<to_>() );
+ {
+ // Conversion
+ typedef ref::nth_result_of::array<
+ 8,int const>::type array_;
+
+ using namespace checking::constants;
+ array_ from = ref::array
+ ( a )( b )( c )( d )( e )( f )( g )( h );
+ using namespace checking::container;
+ {
+ typedef boost::array<int,8> to_;
+ MACRO
+ }
+ {
+ typedef std::deque<int> to_;
+ MACRO
+ }
+ {
+ typedef std::list<int> to_;
+ MACRO
+ }
+ {
+ typedef std::queue<int> to_;
+ MACRO
+ }
+ {
+ typedef std::set<int> to_;
+ MACRO
+ }
+ {
+ typedef std::stack<int> to_;
+ MACRO
+ }
+ {
+ typedef std::vector<int> to_;
+ MACRO
+ }
+#undef MACRO
+ }
+/*
+ { // Relational
+ using namespace checking::constants;
+ using namespace checking::relational_op;
+ do_check(
+ ref::array
+ ( a )( b )( c )( d )( e )( f )( g )( h )
+ );
+ }
+*/
+ }
+
+}// xxx_array
+}// xxx_ref
+}// test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/ref/array.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/array.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_TEST_REF_ARRAY_ER_2010_H
+#define BOOST_ASSIGN_V2_TEST_REF_ARRAY_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_array{
+
+ void test();
+
+}// xxx_array
+}// xxx_ref
+}// test_assign
+
+#endif
+

Added: sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,80 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <boost/mpl/int.hpp>
+#include <boost/mpl/empty_base.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/algorithm/copy.hpp>
+#include <boost/typeof/typeof.hpp>
+#include <boost/assign/v2/detail/checking/constants.hpp>
+#include <boost/assign/v2/detail/checking/range.hpp>
+#include <boost/assign/v2/detail/checking/array.hpp>
+#include <boost/assign/v2/ref/array/csv.hpp>
+#include <libs/assign/v2/test/ref/csv_array.h>
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_csv_array{
+
+ void test()
+ {
+ using namespace boost::assign::v2;
+ typedef ref::assign_tag::copy copy_;
+ {
+ typedef ref::nth_result_of::csv_array<8, int const>::type ar_;
+ using namespace checking::constants;
+ ar_ ar = ref::csv_array( a , b , c , d , e , f , g , h );
+ using namespace checking;
+ {
+ typedef container_tag::static_array tag_;
+ checking::do_check(tag_(), ar );
+ }
+ {
+ typedef container_tag::range tag_;
+ checking::do_check(tag_(), ar );
+ }
+ }
+ {
+ int a1, b1, c1, d1, e1, f1, g1, h1;
+ typedef std::vector<int> vec_;
+ vec_ vec;
+ {
+ using namespace checking::constants;
+ vec.push_back( a );
+ vec.push_back( b );
+ vec.push_back( c );
+ vec.push_back( d );
+ vec.push_back( e );
+ vec.push_back( f );
+ vec.push_back( g );
+ vec.push_back( h );
+ }
+ boost::copy(
+ vec,
+ boost::begin(
+ ref::csv_array( a1 , b1 , c1 , d1 , e1 , f1 , g1 , h1 )
+ )
+ );
+ {
+ using namespace checking;
+ typedef container_tag::static_array tag_;
+ do_check(
+ tag_(),
+ ref::csv_array<int const>(
+ a1 , b1 , c1 , d1 , e1 , f1 , g1 , h1
+ )
+ );
+ }
+ }
+ }
+
+}// xxx_csv_array
+}// xxx_ref
+}// test_assign

Added: sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/csv_array.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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) //
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_ASSIGN_V2_TEST_REF_CSV_ARRAY_ER_2010_H
+#define BOOST_ASSIGN_V2_TEST_REF_CSV_ARRAY_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_csv_array{
+
+ void test();
+
+}// xxx_csv_array
+}// xxx_ref
+}// test_assign
+
+#endif
+

Added: sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,181 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <iostream>
+#include <assert.h>
+#include <boost/mpl/vector/vector0.hpp>
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/assign/v2/ref/list_tuple.hpp>
+
+#include <boost/type_traits/add_reference.hpp>
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_list_tuple{
+
+ void test()
+ {
+ using namespace boost;
+ using namespace assign::v2;
+ namespace ns = ref::list_tuple_aux;
+ typedef boost::mpl::int_<0> i0_;
+ typedef boost::mpl::int_<1> i1_;
+ typedef boost::mpl::int_<2> i2_;
+ typedef boost::mpl::int_<3> i3_;
+
+ #define A 1
+ #define B 2
+ 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_;
+#endif
+ {
+ typedef boost::mpl::vector0<> v0_;
+
+ typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef boost::mpl::vector2<
+ v0_,
+ v0_
+ > input_;
+
+ typedef boost::mpl::apply1<
+ meta_result_,
+ input_
+ >::type result_;
+
+ result_ list = 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 boost::mpl::vector4<
+ v0_,
+ v1_,
+ v0_,
+ v1_
+ > input_;
+
+ typedef boost::mpl::apply1<
+ meta_result_,
+ 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 );
+
+ }
+ {
+ typedef boost::mpl::vector2<lvalue_, lvalue_> v0_;
+ typedef boost::mpl::vector2<lvalue_, rvalue_> v1_;
+ typedef boost::mpl::vector2<rvalue_, lvalue_> v2_;
+ typedef boost::mpl::vector2<rvalue_, rvalue_> v3_;
+
+ typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef boost::mpl::vector4<
+ v0_,
+ v1_,
+ v2_,
+ v3_
+ > input_;
+
+ typedef boost::mpl::apply1<
+ meta_result_,
+ 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 );
+
+ }
+ {
+ typedef boost::mpl::vector2<lvalue_, lvalue_> v0_;
+ typedef boost::mpl::vector2<lvalue_, clvalue_> v1_;
+ typedef boost::mpl::vector2<clvalue_, lvalue_> v2_;
+ typedef boost::mpl::vector2<clvalue_, clvalue_> v3_;
+
+ typedef ref::nth_result_of::list_tuple meta_result_;
+ typedef boost::mpl::vector4<
+ v0_,
+ v1_,
+ v2_,
+ v3_
+ > input_;
+
+ typedef boost::mpl::apply1<
+ meta_result_,
+ input_
+ >::type result_;
+
+ int const aa = A;
+ 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 );
+
+ }
+
+ #undef A
+ #undef B
+
+ {
+ // TODO
+ typedef const char ar_[2];
+ #if BOOST_ASSIGN_V2_ENABLE_CPP0X
+ typedef boost::add_reference<ar_>::type type;
+ #else
+ typedef ar_ type;
+ #endif
+ typedef boost::mpl::vector1<type> v0_;
+
+ typedef 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" );
+ typedef std::string str_;
+ assert( str_( get<0>( list.get( i0_() ) ) ) == "x" );
+ assert( str_( get<0>( list.get( i0_() ) ) ) != "y" );
+ }
+
+ }// test
+
+}// xxx_list_tuple
+}// xxx_ref
+}// test_assign_v2

Added: sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/ref/list_tuple.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 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 BOOST_ASSIGN_V2_TEST_REF_LIST_TUPLE_ER_2010_H
+#define BOOST_ASSIGN_V2_TEST_REF_LIST_TUPLE_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_ref{
+namespace xxx_list_tuple{
+
+ void test();
+
+}// xxx_list_tuple
+}// xxx_ref
+}// test_assign
+
+#endif // LIBS_ASSIGN_V2_TEST_REF_LIST_TUPLE_ER_2010_H

Added: sandbox/statistics/support/libs/assign/v2/test/type_traits.cpp
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/type_traits.cpp 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,26 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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 <libs/assign/v2/test/type_traits/has_push.h>
+#include <libs/assign/v2/test/type_traits/has_static_size.h>
+#include <libs/assign/v2/test/type_traits/has_value_type.h>
+#include <libs/assign/v2/test/type_traits.h>
+
+namespace test_assign_v2{
+namespace xxx_type_traits{
+
+ void test(){
+ xxx_has_push::test();
+ xxx_has_static_size::test();
+ xxx_has_value_type::test();
+ }
+
+}// xxx_type_traits
+}// xxx_test_assign
+

Added: sandbox/statistics/support/libs/assign/v2/test/type_traits.h
==============================================================================
--- (empty file)
+++ sandbox/statistics/support/libs/assign/v2/test/type_traits.h 2011-01-08 18:52:09 EST (Sat, 08 Jan 2011)
@@ -0,0 +1,21 @@
+//////////////////////////////////////////////////////////////////////////////
+// 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_TYPE_TRAITS_ER_2010_H
+#define LIBS_ASSIGN_V2_TEST_TYPE_TRAITS_ER_2010_H
+
+namespace test_assign_v2{
+namespace xxx_type_traits{
+
+ void test();
+
+}// xxx_type_traits
+}// 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