Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69687 - in sandbox/assign_v2: boost/assign/v2 boost/assign/v2/detail/functor boost/assign/v2/put boost/assign/v2/put/modulo boost/assign/v2/put/pipe/csv boost/assign/v2/ref boost/assign/v2/utility boost/assign/v2/utility/convert libs/assign/v2/test libs/assign/v2/test/put/container libs/assign/v2/test/put/modifier libs/assign/v2/test/put/pipe libs/assign/v2/test/put/pipe/functor libs/assign/v2/test/put/pipe/modifier libs/assign/v2/test/ref/array libs/assign/v2/test/utility
From: erwann.rogard_at_[hidden]
Date: 2011-03-08 10:46:50


Author: e_r
Date: 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
New Revision: 69687
URL: http://svn.boost.org/trac/boost/changeset/69687

Log:
upd assign_v2
Text files modified:
   sandbox/assign_v2/boost/assign/v2/detail/functor/identity.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/deque.hpp | 2
   sandbox/assign_v2/boost/assign/v2/put/modulo/fun.hpp | 1
   sandbox/assign_v2/boost/assign/v2/put/pipe/csv/operator.hpp | 2
   sandbox/assign_v2/boost/assign/v2/ref/array.hpp | 2
   sandbox/assign_v2/boost/assign/v2/utility.hpp | 2
   sandbox/assign_v2/boost/assign/v2/utility/convert.hpp | 11 +--
   sandbox/assign_v2/boost/assign/v2/utility/convert/check.hpp | 8 +-
   sandbox/assign_v2/boost/assign/v2/utility/convert/converter.hpp | 47 +++++-----------
   sandbox/assign_v2/boost/assign/v2/utility/convert/deduce_tag.hpp | 8 +-
   sandbox/assign_v2/boost/assign/v2/utility/convert/dispatch.hpp | 12 ---
   sandbox/assign_v2/boost/assign/v2/utility/convert/helper.hpp | 4
   sandbox/assign_v2/boost/assign/v2/utility/convert/predicate.hpp | 4
   sandbox/assign_v2/libs/assign/v2/test/other.cpp | 112 ---------------------------------------
   sandbox/assign_v2/libs/assign/v2/test/other.h | 22 -------
   sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp | 5 -
   sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp | 4
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/operator.cpp | 14 ++--
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp | 8 +-
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp | 12 ++-
   sandbox/assign_v2/libs/assign/v2/test/put/pipe/range.cpp | 9 +-
   sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp | 10 +-
   sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp | 29 ++++++----
   sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp | 24 ++++++++
   24 files changed, 113 insertions(+), 241 deletions(-)

Modified: sandbox/assign_v2/boost/assign/v2/detail/functor/identity.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/detail/functor/identity.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/detail/functor/identity.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -84,7 +84,7 @@
 
 }// functor_aux
 namespace{
- functor_aux::identity const _identity = functor_aux::identity();
+ functor_aux::identity const _functor_identity = functor_aux::identity();
 }
 }// v2
 }// assigns

Modified: sandbox/assign_v2/boost/assign/v2/put/deque.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/deque.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/deque.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -11,7 +11,7 @@
 #define BOOST_ASSIGN_V2_PUT_DEQUE_ER_2010_HPP
 
 #include <boost/assign/v2/put/deque/cont.hpp>
-#include <boost/assign/v2/put/deque/converter.hpp>
+#include <boost/assign/v2/put/deque/conversion.hpp>
 #include <boost/assign/v2/put/deque/csv.hpp>
 #include <boost/assign/v2/put/deque/functor.hpp>
 #include <boost/assign/v2/put/deque/replace.hpp>

Modified: sandbox/assign_v2/boost/assign/v2/put/modulo/fun.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/modulo/fun.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/modulo/fun.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -9,6 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_MODULO_FUN_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_MODULO_FUN_ER_2010_HPP
+#include <boost/assign/v2/put/modulo/fun/keyword.hpp>
 #include <boost/assign/v2/put/modulo/fun/make.hpp>
 #include <boost/assign/v2/put/modulo/fun/meta.hpp>
 #endif

Modified: sandbox/assign_v2/boost/assign/v2/put/pipe/csv/operator.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/put/pipe/csv/operator.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/put/pipe/csv/operator.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -9,7 +9,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_V2_PUT_PIPE_CSV_OPERATOR_ER_2010_HPP
 #define BOOST_ASSIGN_V2_PUT_PIPE_CSV_OPERATOR_ER_2010_HPP
-//#include <boost/assign/v2/put/pipe/modulo/forward.hpp>
+#include <boost/assign/v2/put/pipe/modulo/forward.hpp>
 #include <boost/assign/v2/ref/array/as_arglist.hpp>
 #include <boost/assign/v2/put/pipe/csv/rhs.hpp>
 #include <boost/assign/v2/put/pipe/csv/size_type.hpp>

Modified: sandbox/assign_v2/boost/assign/v2/ref/array.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/ref/array.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/ref/array.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -12,6 +12,6 @@
 
 #include <boost/assign/v2/ref/array/csv.hpp>
 #include <boost/assign/v2/ref/array/functor.hpp>
-#include <boost/assign/v2/ref/array/converter.hpp>
+#include <boost/assign/v2/ref/array/conversion.hpp>
 
 #endif

Modified: sandbox/assign_v2/boost/assign/v2/utility.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -11,7 +11,7 @@
 #define BOOST_ASSIGN_V2_UTILITY_ER_2010_HPP
 
 #include <boost/assign/v2/utility/chain.hpp>
-#include <boost/assign/v2/utility/convert.hpp>
+#include <boost/assign/v2/utility/conversion.hpp>
 #include <boost/assign/v2/utility/csv.hpp>
 
 #endif

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,12 +7,11 @@
 // 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_UTILITY_CONVERT_ER_2010_HPP
-#define BOOST_ASSIGN_V2_UTILITY_CONVERT_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_ER_2010_HPP
 
-#include <boost/assign/v2/utility/convert/deduce_tag.hpp>
-#include <boost/assign/v2/utility/convert/dispatch.hpp>
-#include <boost/assign/v2/utility/convert/predicate.hpp>
-#include <boost/assign/v2/utility/convert/converter.hpp>
+#include <boost/assign/v2/utility/conversion/convert.hpp>
+#include <boost/assign/v2/utility/conversion/converter.hpp>
+#include <boost/assign/v2/utility/conversion/name_lookup.hpp>
 
 #endif

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/check.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/check.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/check.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -20,12 +20,12 @@
 #include <boost/type.hpp>
 #include <boost/array.hpp>
 #include <boost/type_traits/is_same.hpp>
-#include <boost/assign/v2/utility/convert/converter.hpp>
-#include <boost/assign/v2/utility/convert/deduce_tag.hpp>
-#include <boost/assign/v2/utility/convert/predicate.hpp>
+#include <boost/assign/v2/utility/conversion/converter.hpp>
+#include <boost/assign/v2/utility/conversion/deduce_tag.hpp>
+#include <boost/assign/v2/utility/conversion/predicate.hpp>
 #include <boost/assign/v2/detail/check/fwd_equal_container.hpp>
 
-// Don't include this file in v2/utility/convert.hpp
+// Don't include this file in v2/utility/conversion.hpp
 
 namespace boost{
 namespace assign{

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/converter.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/converter.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/converter.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,14 +7,13 @@
 // 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_CONVERT_CONVERTER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_CONVERT_CONVERTER_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_ER_2010_HPP
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 #include <boost/type_traits/add_const.hpp>
 #include <boost/assign/v2/ref/wrapper.hpp>
-#include <boost/assign/v2/utility/convert/dispatch.hpp>
-#include <boost/assign/v2/utility/convert/deduce_tag.hpp>
+#include <boost/assign/v2/utility/conversion/convert.hpp>
 
 namespace boost{
 namespace assign{
@@ -44,7 +43,7 @@
         template<typename C>
         C type()const
         {
- return convert_aux::dispatch<C>( this->w.get() );
+ return convert_aux::convert<C>( this->w.get() );
         }
 
         private:
@@ -75,44 +74,28 @@
 }// assign
 }// boost
 
-// Define name lookup for name
-// namespace ns{
-// template<typename A, typename B, typename C> cont;
-// }
-// is done by expanding this macro:
-// #define SEQ (A)(B)(C)
-// namespace ns{
-// BOOST_ASSIGN_V2_CONVERTER( cont<A,B,C>, SEQ )
-// }
-//
 
-#include <boost/preprocessor/seq/enum.hpp>
-#include <boost/preprocessor/seq/transform.hpp>
-
-#ifndef BOOST_ASSIGN_V2_CONVERTER_OP
-#define BOOST_ASSIGN_V2_CONVERTER_OP(s, data, T) typename T
+#if defined( BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_NAME_LOOKUP_PARAM ) || defined ( BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_NAME_LOOKUP )
+#error
 #endif
-#ifndef BOOST_ASSIGN_V2_CONVERTER
 
-// Expanding
-// namespace ns{
-// BOOST_ASSIGN_V2_CONVERTER( (A)(B)(C), cont<A,B,C> )
-// }
-// creates a name-lookup version of converter() for name ns::cont<A, B, C>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/transform.hpp>
 
-#define BOOST_ASSIGN_V2_CONVERTER(Seq, U)\
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_NAME_LOOKUP_PARAM(s, data, T) typename T
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER(Seq, R)\
     template<BOOST_PP_SEQ_ENUM(\
         BOOST_PP_SEQ_TRANSFORM(\
- BOOST_ASSIGN_V2_CONVERTER_OP,\
+ BOOST_ASSIGN_V2_UTILITY_CONVERSION_CONVERTER_NAME_LOOKUP_PARAM,\
             ~,\
             Seq\
         )\
     )>\
- typename ::boost::assign::v2::result_of::converter< U >::type \
- converter( U const& cont)\
+ typename ::boost::assign::v2::result_of::converter< R >::type \
+ converter( R const& range)\
     {\
- typedef typename ::boost::assign::v2::result_of::converter< U >::type result_; \
- return result_( cont );\
+ typedef typename ::boost::assign::v2::result_of::converter< R >::type result_; \
+ return result_( range );\
     }\
 /**/
 #endif

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/deduce_tag.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/deduce_tag.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/deduce_tag.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,12 +7,12 @@
 // 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_CONVERT_DEDUCE_TAG_ER_2010_HPP
-#define BOOST_ASSIGN_V2_CONVERT_DEDUCE_TAG_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_DEDUCE_TAG_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_DEDUCE_TAG_ER_2010_HPP
 #include <boost/mpl/pair.hpp>
 #include <boost/assign/v2/detail/traits/switch.hpp>
-#include <boost/assign/v2/utility/convert/helper.hpp>
-#include <boost/assign/v2/utility/convert/predicate.hpp>
+#include <boost/assign/v2/utility/conversion/helper.hpp>
+#include <boost/assign/v2/utility/conversion/predicate.hpp>
 
 namespace boost{
     struct use_default;

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/dispatch.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/dispatch.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/dispatch.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,13 +7,12 @@
 // 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_CONVERT_DISPATCH_ER_2010_HPP
-#define BOOST_ASSIGN_V2_CONVERT_DISPATCH_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_DISPATCH_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_DISPATCH_ER_2010_HPP
 #include <boost/range/begin.hpp>
 #include <boost/range/end.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/assign/v2/put/pipe/range.hpp>
-#include <boost/assign/v2/utility/convert/deduce_tag.hpp>
 
 namespace boost{
 namespace assign{
@@ -35,13 +34,6 @@
         return C( boost::begin( r ), boost::end( r ) );
     }
 
- template<typename C, typename R>
- C dispatch(R const& r)
- {
- typedef typename convert_aux::deduce_tag<C, R>::type tag_;
- return convert_aux::dispatch<C>( r, tag_() );
- }
-
 }// convert_aux
 //]
 }// v2

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/helper.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/helper.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/helper.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_CONVERT_HELPER_ER_2010_HPP
-#define BOOST_ASSIGN_V2_CONVERT_HELPER_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_HELPER_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_HELPER_ER_2010_HPP
 #include <boost/mpl/bool.hpp>
 
 namespace boost{

Modified: sandbox/assign_v2/boost/assign/v2/utility/convert/predicate.hpp
==============================================================================
--- sandbox/assign_v2/boost/assign/v2/utility/convert/predicate.hpp (original)
+++ sandbox/assign_v2/boost/assign/v2/utility/convert/predicate.hpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -7,8 +7,8 @@
 // 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_CONVERT_TRAITS_ER_2010_HPP
-#define BOOST_ASSIGN_V2_CONVERT_TRAITS_ER_2010_HPP
+#ifndef BOOST_ASSIGN_V2_UTILITY_CONVERSION_TRAITS_ER_2010_HPP
+#define BOOST_ASSIGN_V2_UTILITY_CONVERSION_TRAITS_ER_2010_HPP
 #include <boost/mpl/or.hpp>
 #include <boost/assign/v2/detail/traits/container/is_array.hpp>
 #include <boost/assign/v2/detail/traits/container/has_push.hpp>

Modified: sandbox/assign_v2/libs/assign/v2/test/other.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/other.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/other.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -1,111 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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 <utility>
-#include <deque>
-#include <list>
-#include <map>
-#include <vector>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/vector.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/array.hpp>
-#include <boost/lambda/lambda.hpp>
-#include <boost/next_prior.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/algorithm/copy.hpp>
-#include <boost/range/algorithm/stable_partition.hpp>
-#include <boost/range/algorithm/equal.hpp>
-#include <boost/assign/v2/detail/config/check.hpp>
-#include <boost/assign/v2/detail/check/equal_ref.hpp>
-#include <boost/assign/v2/detail/check/equal_val.hpp>
-#include <boost/assign/v2/utility/chain.hpp>
-#include <boost/assign/v2/utility/chain/alias.hpp>
-#include <boost/assign/v2/ref/wrapper/range_get.hpp>
-#include <boost/assign/v2/ref/array/csv.hpp>
-#include <boost/assign/v2/ref/array/functor.hpp>
-#include <boost/assign/v2/ref/array/converter.hpp>
-#include <boost/assign/v2/put/container.hpp>
-#include <boost/assign/v2/put/deque.hpp>
-#include <boost/assign/v2/put/container/functor.hpp>
-#include <boost/assign/v2/put/pipe/functor.hpp>
-#include <boost/assign/v2/put/pipe/csv.hpp>
-#include <boost/assign/v2/utility/csv.hpp>
-#include <libs/assign/v2/test/other.h>
-
-namespace test_assign_v2{
-namespace xxx_other{
-
- // Tests interaction between different functionalities
-
- void test(){
-
- namespace as2 = boost::assign::v2;
- namespace lambda = boost::lambda;
-
-
- // INTRODUCTION
- {
- // suggested by JB:
-
- //[other_put_pipe_csv
- std::deque<int> cont;
- boost::range::stable_partition(
- /*<< Calls `cont.push_back( t )` for [^t=0,...,5], and returns `cont` >>*/
- cont | as2::_csv_put( 0, 1, 2, 3, 4, 5 ),
- lambda::_1 % 2
- );
- //]
- //[other_ref_csv_array
- BOOST_ASSIGN_V2_CHECK(boost::range::equal(
- cont,
- /*<< The input [^1, 3, ..., 4] is held by reference (not copies) >>*/
- as2::ref::csv_array(1, 3, 5, 0, 2, 4)
- ));
- //]
- }
- // REF + CONVERTER
- {
- //[other_convert_ref_array
- typedef std::pair<std::string, double> T;
- typedef std::vector<T> C;
- C cont = /*<< Name lookup >>*/ converter(
- as2::ref::array( T("pi", 3.14) )( T("e", 2.71) )( T("log2", 0.69) )
- );
-
- BOOST_ASSIGN_V2_CHECK( cont[1].first == "e" );
- BOOST_ASSIGN_V2_CHECK( cont[1].second == 2.71 );
- //]
- BOOST_ASSIGN_V2_CHECK( cont[0].first == "pi" );
- BOOST_ASSIGN_V2_CHECK( cont[0].second == 3.14 );
- BOOST_ASSIGN_V2_CHECK( cont[2].first == "log2" );
- BOOST_ASSIGN_V2_CHECK( cont[2].second == 0.69 );
- }
- // CHAIN + REF
- {
- //[other_chain_write
- /*<< Needed to bring && into scope >>*/ using namespace boost::assign::v2;
- std::vector<int> r( 3 ); r[0] = 1; r[1] = 2; r[2] = 0;
- /*<< lvalue >>*/boost::array<int, 2> cont; /*<< lvalue >>*/ int z;
- boost::copy(
- r,
- boost::begin(
- cont && (/*<< rvalue >>*/ as2::ref::csv_array( z ) | as2::ref::_get )
- )
- );
-
- BOOST_ASSIGN_V2_CHECK( cont[0] == r[0] );
- BOOST_ASSIGN_V2_CHECK( cont[1] == r[1] );
- BOOST_ASSIGN_V2_CHECK( z == r[2] );
- //]
- }
- }
-
-}// xxx_other
-}// xxx_test_assign
+// TODO remove file
\ No newline at end of file

Modified: sandbox/assign_v2/libs/assign/v2/test/other.h
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/other.h (original)
+++ sandbox/assign_v2/libs/assign/v2/test/other.h 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -1,21 +1 @@
-//////////////////////////////////////////////////////////////////////////////
-// 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_OTHER_ER_2010_H
-#define LIBS_ASSIGN_V2_TEST_OTHER_ER_2010_H
-
-namespace test_assign_v2{
-namespace xxx_other{
-
- void test();
-
-}// xxx_other
-}// xxx_test_assign
-
-#endif
+// TODO remove file
\ No newline at end of file

Modified: sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/container/range.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -26,7 +26,7 @@
         namespace as2 = boost::assign::v2;
 
             //[range_assign
- typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY", ca = "CA", ore = "OR", wa = "WA";
+ typedef const char state_ [3]; state_ ct = "CT", nj = "NJ", ny = "NY", ca = "CA", /*ore = "OR",*/ wa = "WA";
             typedef int code_; typedef boost::tuple<state_/*<<Notice the reference>>*/&, code_> area_code_;
             std::deque< area_code_ > tri_state; as2::put( tri_state )( nj, 201 )( ct, 203 )( ny, 212 )( ny, 315 )( ny, 347 )( nj, 551 );
             std::deque< area_code_ > pacific ; as2::put( pacific )( wa, 206 )( ca, 209 )( ca, 213 )( wa, 253 );
@@ -43,9 +43,8 @@
         {
             //[range_constr
             std::vector<int> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- typedef std::stack<int> lifo_;
 
- BOOST_ASSIGN_V2_CHECK( as2::put_range<lifo_>( r ).top() == 48 );
+ BOOST_ASSIGN_V2_CHECK( as2::put_range< std:: stack<int> >( r ).top() == 48 );
             //]
         }
     }

Modified: sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/modifier/lookup.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -19,7 +19,7 @@
 
 #include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/detail/functor/identity.hpp>
-#include <boost/assign/v2/put/modulo/fun.hpp>
+#include <boost/assign/v2/put/fun/identity.hpp>
 #include <boost/assign/v2/put/modifier/lookup.hpp>
 #include <boost/assign/v2/put/container/functor.hpp>
 #include <boost/assign/v2/put/deque.hpp>
@@ -53,7 +53,7 @@
             //[lookup
             typedef std::map<std::string, int> C; C cal;
             (
- /*Input is by default mapped to C::value_type but, here, we need C::key_type*/as2::put( cal ) /*Makes the input convertible to C::key_type*/% ( as2::_fun = as2::_identity ) % ( as2::_lookup = (lambda::_1 = 31) )
+ /*Input is by default mapped to C::value_type but, here, we need C::key_type*/as2::put( cal ) /*Makes the input convertible to C::key_type*/% as2::_identity % ( as2::_lookup = (lambda::_1 = 31) )
             )( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" );
             BOOST_ASSIGN_V2_CHECK( cal["jan"] == 31 );
             BOOST_ASSIGN_V2_CHECK( cal["dec"] == 31 );

Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/operator.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/operator.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/functor/operator.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -82,16 +82,16 @@
                         ( )
             )[2];
 
+ elem_ eps = boost::numeric::bounds<elem_>::smallest();
+ BOOST_ASSIGN_V2_CHECK( abs( front - 0.71 ) < eps );
+ BOOST_ASSIGN_V2_CHECK( abs( back - 0.85 ) < eps );
+ BOOST_ASSIGN_V2_CHECK( abs( r.front() + 99.0 ) < eps );
+ BOOST_ASSIGN_V2_CHECK( abs( r.back() + 99.0 ) < eps );
+ //]
             BOOST_ASSIGN_V2_CHECK( ragged_array[0].size() == a.size() );
             BOOST_ASSIGN_V2_CHECK( ragged_array[1].size() == b.size() );
             BOOST_ASSIGN_V2_CHECK( ragged_array[2].size() == 1 );
             BOOST_ASSIGN_V2_CHECK( ragged_array[3].size() == 0 );
- elem_ eps = boost::numeric::bounds<elem_>::smallest();
- BOOST_ASSIGN_V2_CHECK( abs( front - 0.71 ) < eps );
- BOOST_ASSIGN_V2_CHECK( abs( back - 0.85 ) < eps );
- BOOST_ASSIGN_V2_CHECK( abs( r.front() + 99.0 ) < eps );
- BOOST_ASSIGN_V2_CHECK( abs( r.back() + 99.0 ) < eps );
- //]
                 }
                 {
             using namespace boost;
@@ -104,8 +104,8 @@
             ).front();
 
             BOOST_ASSIGN_V2_CHECK( get<0>( front ) == nj );
- BOOST_ASSIGN_V2_CHECK( get<0>( tri_state.back() ) == nj );
             BOOST_ASSIGN_V2_CHECK( get<1>( front ) == 201 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( tri_state.back() ) == nj );
             BOOST_ASSIGN_V2_CHECK( get<1>( tri_state.back() ) == 551 );
             //]
         }

Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/lookup.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -11,12 +11,11 @@
 #include <string>
 #include <cmath>
 #include <boost/lambda/lambda.hpp>
-#include <boost/typeof/typeof.hpp>
 #include <boost/tuple/tuple.hpp>
 
 #include <boost/assign/v2/detail/config/check.hpp>
 #include <boost/assign/v2/detail/functor/identity.hpp>
-#include <boost/assign/v2/put/modulo/fun.hpp>
+#include <boost/assign/v2/put/fun/identity.hpp>
 #include <boost/assign/v2/put/modifier/lookup.hpp>
 #include <boost/assign/v2/put/pipe/functor.hpp>
 #include <libs/assign/v2/test/put/pipe/modifier/lookup.h>
@@ -34,11 +33,10 @@
         {
             //[lookup
             typedef std::map<std::string, int> C; C cal;
- BOOST_AUTO( _id, ( as2::_fun = as2::_identity ) );
             C::mapped_type n_mar = (
                     cal | as2::_put( "feb", 28 )
- | ( /*Input is by default mapped to C::value_type but, here, we need C::key_type*/ as2::_put % /*Makes the input convertible to C::key_type*/_id % ( as2::_lookup = (lambda::_1 = 31) ) )( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" )
- | ( as2::_put % _id % ( as2::_lookup = (lambda::_1 = 30) ) )( "apr" )( "jun" )( "sep" )( "nov" )
+ | ( /*Input is by default mapped to C::value_type but, here, we need C::key_type*/ as2::_put % /*Makes the input convertible to C::key_type*/as2::_identity % ( as2::_lookup = (lambda::_1 = 31) ) )( "jan" )( "mar" )( "may" )( "jul" )( "aug" )( "oct" )( "dec" )
+ | ( as2::_put % as2::_identity % ( as2::_lookup = (lambda::_1 = 30) ) )( "apr" )( "jun" )( "sep" )( "nov" )
             )["mar"];
             
             BOOST_ASSIGN_V2_CHECK( n_mar == 31 );

Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/modifier/standard.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -39,17 +39,19 @@
 
         {
             //[pipe_modifier_push_front
- std::deque<int> powers;
- powers | ( as2::_put % as2::_push_front )( 16 )( 8 )( 4 )( 2 )( 1 );
+ std::deque<int> powers; int front = (
+ powers | ( as2::_put % as2::_push_front )( 16 )( 8 )( 4 )( 2 )( 1 )
+ ).front();
 
- BOOST_ASSIGN_V2_CHECK( powers[0] == 1 );
+ BOOST_ASSIGN_V2_CHECK( front == 1 );
             BOOST_ASSIGN_V2_CHECK( powers[4] == 16 );
             //]
         }
         {
             //[pipe_modifier_push
- typedef int int_; std::queue<int_> fifo;
- int_ front = ( fifo | ( as2::_put % as2::_push )( 72 )( 31 )( 48 ) ).front();
+ typedef int int_; std::queue<int_> fifo; int_ front = (
+ fifo | ( as2::_put % as2::_push )( 72 )( 31 )( 48 )
+ ).front();
                 
             BOOST_ASSIGN_V2_CHECK( front == 72 );
             BOOST_ASSIGN_V2_CHECK( fifo.back() == 48 );

Modified: sandbox/assign_v2/libs/assign/v2/test/put/pipe/range.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/put/pipe/range.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/put/pipe/range.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -37,21 +37,20 @@
 
                         using namespace boost;
             BOOST_ASSIGN_V2_CHECK( get<0>( states.front() ) == nj );
- BOOST_ASSIGN_V2_CHECK( get<0>( states[tri_state.size()-1] ) == nj );
- BOOST_ASSIGN_V2_CHECK( get<0>( states[tri_state.size()] ) == wa );
- BOOST_ASSIGN_V2_CHECK( get<0>( states.back() ) == wa );
             BOOST_ASSIGN_V2_CHECK( get<1>( states.front() ) == 201 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( states[tri_state.size()-1] ) == nj );
             BOOST_ASSIGN_V2_CHECK( get<1>( states[tri_state.size()-1] ) == 551 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( states[tri_state.size()] ) == wa );
             BOOST_ASSIGN_V2_CHECK( get<1>( states[tri_state.size()] ) == 206 );
+ BOOST_ASSIGN_V2_CHECK( get<0>( states.back() ) == wa );
             BOOST_ASSIGN_V2_CHECK( get<1>( states.back() ) == 253 );
             //]
         }
         {
             //[pipe_range_constr
             std::vector<int> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
- typedef std::stack<int> lifo_;
 
- BOOST_ASSIGN_V2_CHECK( ( ::boost::type<lifo_>() | as2::_put_range( r ) ).top() == 48 );
+ BOOST_ASSIGN_V2_CHECK( ( ::boost::type< std::stack<int> >() | as2::_put_range( r ) ).top() == 48 );
             //]
         }
     }

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/csv.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -25,9 +25,9 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[ref_array_csv
+ //[ref_csv_array
             typedef int const T;
- T x = 1, y = 2, z = 0;
+ T x = 72, y = 31, z = 48;
             typedef as2::ref::nth_result_of::csv_array<3, T>::type ar_;
             ar_ ar = as2::ref::csv_array( x, y, z );
             {
@@ -49,9 +49,9 @@
             }
         }
         {
- //[ref_array_csv_w
+ //[ref_csv_array_w
             typedef int T; T x, y, z;
- std::vector<T> r( 3 ); r[0] = 1; r[1] = 2; r[2] = 0;
+ std::vector<T> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
             boost::copy( r, boost::begin(
                     as2::ref::csv_array( x, y, z ) | as2::ref::_get
                 )
@@ -61,7 +61,7 @@
             //]
         }
         {
- //[ref_array_csv_assign
+ //[ref_csv_array_assign
             typedef int T; T x, y, z;
             as2::ref::csv_array( x, y, z ).assign( -1 );
             BOOST_ASSIGN_V2_CHECK( x == -1 );

Modified: sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/ref/array/functor.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -26,34 +26,39 @@
     {
         namespace as2 = boost::assign::v2;
         {
- //[ref_array_functor_r
+ //[ref_array_r
             typedef int const T;
- T x = 1, y = 2, z = 0;
- typedef as2::ref::nth_result_of::array<3, T>::type ar_;
- ar_ ar = as2::ref::array( x )( y )( z );
+ T w = 11, x = 72, y = 31, z = 48;
+ as2::ref::nth_result_of::array<3, T>::type ar3 = as2::ref::array( w )( x )( y );
             {
- T& rx = ar.front(); T& rz = ar.back();
- BOOST_ASSIGN_V2_CHECK( &rx == &x );
+ T& rw = ar3.front(); T& ry = ar3.back();
+ BOOST_ASSIGN_V2_CHECK( &rw == &w );
+ BOOST_ASSIGN_V2_CHECK( &ry == &y );
+ }
+ as2::ref::nth_result_of::array<4, T>::type ar4 = ar3( z );
+ {
+ T& rw = ar4.front(); T& rz = ar4.back();
+ BOOST_ASSIGN_V2_CHECK( &rw == &w );
                 BOOST_ASSIGN_V2_CHECK( &rz == &z );
             }
             //]
             {
- T& rx = ar[0]; T& rz = ar[2];
+ T& rx = ar4[0]; T& rz = ar4[2];
                 BOOST_ASSIGN_V2_CHECK( &rx == &x );
                 BOOST_ASSIGN_V2_CHECK( &rz == &z );
                 //]
             }
             {
- T& rx = ( *boost::begin( ar ) );
- T& rz = *boost::next( boost::begin( ar ), 2 );
+ T& rx = ( *boost::begin( ar4 ) );
+ T& rz = *boost::next( boost::begin( ar4 ), 2 );
                 BOOST_ASSIGN_V2_CHECK( &rx == &x );
                 BOOST_ASSIGN_V2_CHECK( &rz == &z );
             }
         }
         {
- //[ref_array_functor_w
+ //[ref_array_w
             typedef int T; T x, y, z;
- std::vector<T> r( 3 ); r[0] = 1; r[1] = 2; r[2] = 0;
+ std::vector<T> r( 3 ); r[0] = 72; r[1] = 31; r[2] = 48;
             boost::copy( r, boost::begin(
                     as2::ref::array( x )( y )( z ) | as2::ref::_get
                 )
@@ -63,7 +68,7 @@
             //]
         }
         {
- //[ref_array_functor_as
+ //[ref_array_assign
             typedef int T; T x, y, z;
             as2::ref::array( x )( y )( z ).assign( -1 );
             BOOST_ASSIGN_V2_CHECK( x == -1 );

Modified: sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp
==============================================================================
--- sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp (original)
+++ sandbox/assign_v2/libs/assign/v2/test/utility/chain.cpp 2011-03-08 10:46:40 EST (Tue, 08 Mar 2011)
@@ -15,8 +15,10 @@
 #include <boost/range/end.hpp>
 #include <boost/range/algorithm/copy.hpp>
 #include <boost/range/algorithm/equal.hpp>
+#include <boost/assign/v2/ref/array/csv.hpp>
 #include <boost/assign/v2/utility/chain/check.hpp>
 #include <boost/assign/v2/utility/chain.hpp>
+#include <boost/assign/v2/utility/chain/alias.hpp>
 #include <libs/assign/v2/test/utility/chain.h>
 
 namespace test_assign_v2{
@@ -32,6 +34,7 @@
             { typedef int T; ns::static_<T>(); ns::static_<T>(); }
             { typedef double T; ns::static_<T>(); ns::static_<T>(); }
         }
+ // Non-Boost.Assign.v2 containers
         {
             //[chain_r
             typedef int T;
@@ -57,6 +60,27 @@
             BOOST_ASSIGN_V2_CHECK( cont2.back() == r[3] );
             //]
         }
+ // Boost.Assign.v2 containers
+ {
+ //[chain_ref_array
+ /*<< Needed to bring && into scope >>*/ using namespace boost::assign::v2;
+ std::vector<int> powers( 3 ); powers[0] = 1;
+ for(int i = 1; i < 8; i++){ powers[i] = powers[ i - 1 ] * 2; }
+ boost::array<int, 5> first5; int x, y, z;
+ boost::copy(
+ powers,
+ boost::begin(
+ first5 && (/*<< rvalue! >>*/ as2::ref::csv_array( x, y, z ) | as2::ref::_get )
+ )
+ );
+
+ BOOST_ASSIGN_V2_CHECK( first5.front() == powers.front() );
+ BOOST_ASSIGN_V2_CHECK( first5.back() == powers[first5.size()-1] );
+ BOOST_ASSIGN_V2_CHECK( x == powers[first5.size()] );
+ BOOST_ASSIGN_V2_CHECK( z == powers.back() );
+ //]
+ }
+
 
     }// test
 


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