Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60700 - in sandbox/statistics/detail/assign: boost/assign/auto_size/array boost/assign/auto_size/chain boost/assign/auto_size/check boost/assign/auto_size/comparison_op boost/assign/auto_size/detail boost/assign/auto_size/reference_wrapper libs/assign/example libs/assign/src
From: erwann.rogard_at_[hidden]
Date: 2010-03-19 00:21:30


Author: e_r
Date: 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
New Revision: 60700
URL: http://svn.boost.org/trac/boost/changeset/60700

Log:
m
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/converter.hpp | 34 ++-
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp | 25 +-
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/static.hpp | 12
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/conversion_traits.hpp | 11
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/inner_value_traits.hpp | 4
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/array.hpp | 54 ++----
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain.hpp | 6
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp | 143 ++++++----------
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_array.hpp | 64 ++-----
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_iterator.hpp | 70 +++-----
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/fifo.hpp | 44 ++---
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/iterator.hpp | 51 ++---
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/lifo.hpp | 46 ++---
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/rebind_array.hpp | 72 ++-----
   sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp | 183 ++++-----------------
   sandbox/statistics/detail/assign/boost/assign/auto_size/comparison_op/crtp.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/csv.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp | 328 ++++++++++++++++++++++-----------------
   sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp | 4
   sandbox/statistics/detail/assign/libs/assign/example/chain.cpp | 18 +
   sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 12
   25 files changed, 508 insertions(+), 685 deletions(-)

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/converter.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/converter.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/converter.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -8,6 +8,7 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_CONVERTER_ER_2010_HPP
 #define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_CONVERTER_ER_2010_HPP
+#include <boost/typeof/typeof.hpp>
 #include <boost/assign/list_of.hpp> // for assign_detail::converter
 #include <boost/assign/auto_size/comparison_op/range.hpp>
 
@@ -18,10 +19,10 @@
 
     template< typename T, typename I >
     class converter
- : boost::assign_detail::converter<converter<T,I>,I>
- ,public range_comparison_op::base_of< converter<T,I> >::type
+ : protected boost::assign_detail::converter<T,I>
+ , public range_comparison_op::base_of< T >::type
     {
- typedef boost::assign_detail::converter<converter<T,I>,I> impl_;
+ typedef boost::assign_detail::converter<T,I> impl_;
     protected:
        impl_& impl(){ return (*this); }
        const impl_& impl()const{ return (*this); }
@@ -43,31 +44,40 @@
         template< class Container >
         Container convert_to_container() const
         {
- return this->impl().convert_to_container();
+ return this->impl().convert_to_container<Container>();
         }
         
         template< class Container >
         Container to_container( Container& c ) const
         {
- return this->impl().to_container();
+ return this->impl().to_container(c);
         }
 
- // // adaptor_converter is private.
- //adapter_converter to_adapter() const
- //{
- // return this->impl().to_adapter();
- //}
+ struct result_of_to_adapter{
+ static const impl_ impl;
+
+ typedef BOOST_TYPEOF_TPL( impl.to_adapter() ) type;
+
+ // needed bec impl_::adapter_converter is private
+
+ };
+
+ typename result_of_to_adapter::type
+ to_adapter() const
+ {
+ return this->impl().to_adapter();
+ }
 
         template< class Adapter >
         Adapter to_adapter( Adapter& a ) const
         {
- return this->impl().to_adapter();
+ return this->impl().to_adapter(a);
         }
 
         template< class Array >
         Array to_array( Array& a ) const
         {
- return this->impl().to_array();
+ return this->impl().to_array(a);
         }
 
     };

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -12,7 +12,6 @@
 #include <boost/mpl/bool.hpp>
 #include <boost/array.hpp>
 #include <boost/range.hpp>
-//#include <boost/assign/list_of.hpp> // for assign_detail::converter
 #include <boost/assign/auto_size/array/converter.hpp>
 #include <boost/assign/auto_size/reference_wrapper/has_copy_semantics.hpp>
 #include <boost/assign/auto_size/array/ref.hpp>
@@ -103,6 +102,7 @@
         }
 
         private:
+
         typedef boost::mpl::bool_<false> false_;
         typedef boost::mpl::bool_<true> true_;
 

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -1,19 +1,22 @@
 //////////////////////////////////////////////////////////////////////////////
-// assign::detail::array::policy.hpp //
+// assign::detail::array::lazy.hpp //
 // //
 // (C) Copyright 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_AUTO_SIZE_DETAIL_ARRAY_POLICY_ER_2010_HPP
-#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_POLICY_ER_2010_HPP
+#ifndef BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_LAZY_ER_2010_HPP
+#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_LAZY_ER_2010_HPP
 #include <boost/shared_ptr.hpp>
 #include <boost/assign/auto_size/array/interface.hpp>
 #include <boost/assign/auto_size/array/ref.hpp>
 #include <boost/assign/auto_size/detail/policy.hpp>
 #include <boost/assign/auto_size/array/tag.hpp>
 
+// Declarations for write_to_array and the class that derives from lazy_array
+// must precede inclusion of this class.
+
 namespace boost{
 namespace assign{
 namespace detail{
@@ -35,15 +38,7 @@
             typedef lazy_array<elem_,size_::value,R,E> type;
         };
    };
-
- template<typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- class expr;
-
- template<typename A,typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void write_to_array(A& a,const expr<E,T,N,R,P,F>& e);
-
+
    // Postones allocation until it is necessary.
    // D must interoperate with write_to_array.
    //
@@ -54,7 +49,6 @@
    class lazy_array
             : public array_interface<T,N,R,lazy_array<T,N,R,D> >
     {
-
         typedef typename auto_size::ref_array<T,N,R>::type ref_array_;
                 
         void alloc_if()const{
@@ -65,11 +59,13 @@
 
         void alloc()const{
             this->ptr = smart_ptr_(new ref_array_);
- write_to_array(*this->ptr,static_cast<const D&>(*this));
+ write_to_array<0>(*this->ptr,static_cast<const D&>(*this));
         }
                 
         public:
 
+ void force_alloc(){ this->alloc(); } // TODO remove
+
         ref_array_& ref_array_impl(){
             this->alloc_if();
             return (*this->ptr);
@@ -81,6 +77,7 @@
         }
         
         private:
+
         typedef boost::shared_ptr<ref_array_> smart_ptr_;
         mutable smart_ptr_ ptr;
 

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/array/static.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/array/static.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/array/static.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -1,18 +1,20 @@
 //////////////////////////////////////////////////////////////////////////////
-// assign::detail::array::wrapper.hpp //
+// assign::detail::array::static.hpp //
 // //
 // (C) Copyright 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_AUTO_SIZE_DETAIL_ARRAY_WRAPPER_ER_2010_HPP
-#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_WRAPPER_ER_2010_HPP
+#ifndef BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_STATIC_ER_2010_HPP
+#define BOOST_ASSIGN_AUTO_SIZE_DETAIL_ARRAY_STATIC_ER_2010_HPP
 #include <boost/assign/auto_size/array/interface.hpp>
 #include <boost/assign/auto_size/array/ref.hpp>
-#include <boost/assign/auto_size/detail/expr.hpp> // needed for write_to_array
 #include <boost/assign/auto_size/array/tag.hpp>
 
+// Declarations for write_to_array and the class that derives from static_array
+// must precede inclusion of this class.
+
 namespace boost{
 namespace assign{
 namespace detail{
@@ -49,7 +51,7 @@
 
         template<typename E>
         static_array(const E& coll){
- write_to_array(this->ref_array,coll);
+ write_to_array<0>(this->ref_array,coll);
         }
         
         ref_array_& ref_array_impl(){

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/conversion_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/conversion_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/conversion_traits.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -17,13 +17,12 @@
 namespace detail{
 
 // A type T is mapped to a convertible type U in two steps:
-// 1) Tag = tag_of<T>
-// 2) U = meta::convert_to<Tag>::apply<T>
-// This approach is useful to group types that share the same conversion rule.
+// 1) Tag = tag_of<T>::type
+// 2) U = meta::convert_to<Tag>::apply<T>::type
 // This file defines two groups:
-// Tag U
-// - 'itself' (the default) T
-// - 'reference_to_inner_value' inner_value<T>&
+// Tag U
+// - itself (the default) T
+// - reference_to_inner_value inner_value<T>&
 // but the use can also define his/her own as needed.
 
 namespace conversion_traits{

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/convert_iterator.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -17,7 +17,7 @@
 namespace assign{
 namespace detail{
 
-// Maps an iterator I ot J such that *J = T(*I).
+// Maps an iterator I to J such that *J = T(*I).
 
 template<typename I,typename T>
 struct iterator_converter : boost::iterator_adaptor<

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/inner_value_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/inner_value_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/inner_value_traits.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -15,8 +15,8 @@
 namespace inner_value_traits{
 
 // A type T is mapped to a an 'inner_value', U, in two steps:
-// 1) Tag = tag_of<T>
-// 2) U = meta::inner_value<Tag>::apply<T>::type
+// 1) Tag = tag_of<T>
+// 2) U = meta::inner_value<Tag>::apply<T>::type
 // This approach is useful to define a group (Tag) of types that shares the same
 // property. This file defines one group
 // Tag T U

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_range_traits.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -13,7 +13,7 @@
 #include <boost/assign/auto_size/chain/convert_range.hpp>
 
 // Maps (R1,R2) to a type convertible to by either of the dereference type of
-// either of the input ranges.
+// of the input ranges.
 
 namespace boost{
 namespace assign{

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/chain/pair_traits.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -21,7 +21,7 @@
 #include <boost/assign/auto_size/chain/reference_traits.hpp>
 
 // Maps (T,U) to (convert_to<T>::type, convert_to<U>::type) and the latter
-// to type that is convertible to by both.
+// to a type that is convertible to by both.
 
 
 namespace boost{

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/array.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/array.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/array.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -11,43 +11,31 @@
 #include <boost/typeof/typeof.hpp>
 #include <boost/next_prior.hpp>
 #include <boost/range.hpp>
-
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage
-// check_array(list_of(a)(b)(c)(d)(e)(f)(g)(h),a,b,c,d,e,f,g,h);
-
-template<typename C1,typename T>
-void check_array(const C1& coll,
- const T& a,const T& b,const T& c, const T& d,const T& e,const T& f,
- const T& g,const T& h
-){
- //BOOST_ASSIGN_CHECK_EQUAL( coll.size(), 8 );
- BOOST_ASSIGN_CHECK_EQUAL( coll.empty() , false );
- BOOST_ASSIGN_CHECK_EQUAL( coll[0] , a );
- BOOST_ASSIGN_CHECK_EQUAL( coll[1] , b );
- BOOST_ASSIGN_CHECK_EQUAL( coll[2] , c );
- BOOST_ASSIGN_CHECK_EQUAL( coll[3] , d );
- BOOST_ASSIGN_CHECK_EQUAL( coll[4] , e );
- BOOST_ASSIGN_CHECK_EQUAL( coll[5] , f );
- BOOST_ASSIGN_CHECK_EQUAL( coll[6] , g );
- BOOST_ASSIGN_CHECK_EQUAL( coll[7] , h );
- BOOST_ASSIGN_CHECK_EQUAL( coll.front() , a );
- BOOST_ASSIGN_CHECK_EQUAL( coll.back() , h );
-}
-
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_array \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ \
+ BOOST_AUTO(tmp,BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h)); \
+ \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp.empty() , false ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[0] , a ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[1] , b ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[2] , c ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[3] , d ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[4] , e ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[5] , f ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[6] , g ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp[7] , h ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp.front() , a ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp.back() , h ); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/chain.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -47,9 +47,9 @@
         ar[3] = h;
         BOOST_AUTO(tmp1,chain_convert_l(coll)(ar));
         BOOST_AUTO(tmp2,chain_convert_r(coll)(coll1));
- check_iterator(tmp1,a,b,c,d,e,f,g,h);
- check_iterator(tmp2,a,b,c,d,e,f,g,h);
- check_copy_iterator(tmp1,a,b,c,d,e,f,g,h);
+ //check_iterator(tmp1,a,b,c,d,e,f,g,h);
+ //check_iterator(tmp2,a,b,c,d,e,f,g,h);
+ //check_copy_iterator(tmp1,a,b,c,d,e,f,g,h);
     }
 
 }// auto_size

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/converter.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -8,98 +8,65 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_CONVERTER_ER_2010_HPP
 #define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_CONVERTER_ER_2010_HPP
-#include <set>
-#include <stdexcept>
+#include <boost/array.hpp>
 #include <boost/range.hpp>
-
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage:
-// check_converter(elems,list_of(a)(b)(c)(d)(e)(f)(g)(h),a,b,c,d,e,f,g,h)
-// These must not be a sorted sequence
+#include <boost/range/algorithm/sort.hpp>
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-// fwd declare
-template<typename C,typename C2,typename T>
-void check_converter(
- C& elems, const C2& coll,
- const T& a, const T& b, const T& c, const T& d, const T& e, const T& f,
- const T& g, const T& h, bool sorted = false
-);
-
-// Overload #1
-
-template<typename C2,typename T>
-void check_converter(
- std::set<T>& elems, const C2& coll,
- const T& a, const T& b, const T& c, const T& d, const T& e, const T& f,
- const T& g, const T& h
-){
- check_converter(elems,coll,a,b,c,d,e,f,g,h,true);
-}
-
-// Generic implementation
-
-template<typename C,typename C2,typename T>
-void check_converter(
- C& elems, const C2& coll,
- const T& a, const T& b, const T& c, const T& d, const T& e, const T& f,
- const T& g, const T& h, bool sorted = false
-){
-
- if( (a<=b) && (b<=c) && (c<=d) && (d<=e) && (e<=f) && (f<=g) && (g<=h) ){
- throw std::runtime_error(
- "check_converter expects a non-sorterd sequence"
- );
- }
-
- using namespace boost::assign;
- elems = coll;
- typedef typename boost::range_iterator<const C>::type it_;
- it_ it = boost::begin(elems);
- if(!sorted){
- BOOST_ASSIGN_CHECK_EQUAL(*it , a); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , b); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , c); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , d); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , e); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , f); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , g); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , h); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(it==it_(boost::end(elems)) ,true );
- // Comparison operators
- BOOST_ASSIGN_CHECK_EQUAL(elems == coll,true);
- BOOST_ASSIGN_CHECK_EQUAL(elems >= coll,true);
- BOOST_ASSIGN_CHECK_EQUAL(coll == elems,true);
- BOOST_ASSIGN_CHECK_EQUAL(coll <= elems,true);
- }else{
- BOOST_ASSIGN_CHECK_EQUAL(*it , 0); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 1); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 2); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 3); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 4); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 5); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 7); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(*it , 9); ++it;
- BOOST_ASSIGN_CHECK_EQUAL(it==it_(boost::end(elems)) ,true );
- // Comparison operators
- BOOST_ASSIGN_CHECK_EQUAL(elems != coll,true);
- BOOST_ASSIGN_CHECK_EQUAL(elems < coll, true);
- BOOST_ASSIGN_CHECK_EQUAL(coll != elems,true);
- BOOST_ASSIGN_CHECK_EQUAL(coll > elems, true);
- }
-
-}
-
-}// auto_size
-}// detail
-}// assign
-}// boost
-
+#define BOOST_ASSIGN_AS_CHECK_converter(C) \
+{ \
+ typedef T val_; \
+ \
+ using namespace boost::assign; \
+ using namespace check_constants; \
+ C elems = BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h); \
+ typedef typename boost::range_iterator<const C>::type it_; \
+ it_ it = boost::begin(elems); \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , a); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , b); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , c); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , d); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , e); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , f); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , g); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , h); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(it==it_(boost::end(elems)) ,true ); \
+} \
+/**/
+
+#define BOOST_ASSIGN_AS_CHECK_converter_sorted(C) \
+{ \
+ typedef T val_; \
+ \
+ using namespace boost::assign; \
+ using namespace check_constants; \
+ C elems = BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h); \
+ typedef boost::array<T,8> ar_; \
+ ar_ ar; \
+ ar[0] = a; \
+ ar[1] = b; \
+ ar[2] = c; \
+ ar[3] = d; \
+ ar[4] = e; \
+ ar[5] = f; \
+ ar[6] = g; \
+ ar[7] = h; \
+ boost::sort(ar); \
+ typedef typename boost::range_iterator<const C>::type it_; \
+ it_ it = boost::begin(elems); \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[0]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[1]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[2]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[3]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[4]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[5]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[6]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(*it , ar[7]); ++it; \
+ BOOST_ASSIGN_CHECK_EQUAL(it==it_(boost::end(elems)) ,true ); \
+} \
+/**/
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_array.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_array.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_array.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -10,51 +10,33 @@
 #define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_COPY_ARRAY_ER_2010_HPP
 #include <algorithm>
 #include <boost/range.hpp>
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage
-// BOOST_AUTO(tmp1,ref_list_of(a)(b)(c));
-// BOOST_AUTO(tmp2,ref_list_of(d)(e)(f));
-// check_copy_array(tmp1,tmp2,a,b,c,d,e,f);
-
-template<typename C,typename C1,typename T>
-void check_copy_array(C& coll,C1& coll1,
- T& a, T& b, T& c,
- T& d, T& e, T& f
-){
- // Ensures that they are different
- const T a1 = 1, b1 = 5, c1 = 3,
- d1 = 4, e1 = 2, f1 = 9;
- a = a1;
- b = b1;
- c = c1;
- d = d1;
- e = e1;
- f = f1;
- coll.swap(coll1);
- BOOST_ASSIGN_CHECK_EQUAL( a , d1 );
- BOOST_ASSIGN_CHECK_EQUAL( b , e1 );
- BOOST_ASSIGN_CHECK_EQUAL( c , f1 );
- BOOST_ASSIGN_CHECK_EQUAL( d , a1 );
- BOOST_ASSIGN_CHECK_EQUAL( e , b1 );
- BOOST_ASSIGN_CHECK_EQUAL( f , c1 );
- coll.assign(0);
- BOOST_ASSIGN_CHECK_EQUAL( a , 0 );
- BOOST_ASSIGN_CHECK_EQUAL( b , 0 );
- BOOST_ASSIGN_CHECK_EQUAL( c , 0 );
-}
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_copy_array \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ val_ a1 = a, b1 = b, c1 = c, \
+ d1 = d, e1 = e, f1 = f; \
+ BOOST_AUTO(tmp1,BOOST_ASSIGN_AS_CHECK_ref3(a1,b1,c1)); \
+ BOOST_AUTO(tmp2,BOOST_ASSIGN_AS_CHECK_ref3(d1,e1,f1)); \
+ \
+ tmp1.swap(tmp2); \
+ BOOST_ASSIGN_CHECK_EQUAL( a , d1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( b , e1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( c , f1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( d , a1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( e , b1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( f , c1 ); \
+ BOOST_ASSIGN_AS_CHECK_ref3(a1,b1,c1).assign(0); \
+ BOOST_ASSIGN_CHECK_EQUAL( a1 , 0 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( b1 , 0 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( c1 , 0 ); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_iterator.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_iterator.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/copy_iterator.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -11,53 +11,37 @@
 #include <algorithm>
 #include <boost/range.hpp>
 #include <boost/array.hpp>
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage
-// BOOST_AUTO(tmp,ref_list_of(a)(b)(c)(d)(e)(f)(g)(h))
-// check_iterator(tmp,a,b,c,d,e,f,g,h)
-
-template<typename C,typename T>
-void check_copy_iterator(C& coll,
- // TODO: I guess these can be const
- T& a, T& b, T& c, T& d, T& e, T& f,
- T& g, T& h
-){
- const T
- a1 = 1, b1 = 5, c1 = 3,
- d1 = 4, e1 = 2, f1 = 9,
- g1 = 0, h1 = 7;
- boost::array<T,8> ar;
- ar[0] = a1;
- ar[1] = b1;
- ar[2] = c1;
- ar[3] = d1;
- ar[4] = e1;
- ar[5] = f1;
- ar[6] = g1;
- ar[7] = h1;
- std::copy(boost::begin(ar),boost::end(ar),boost::begin(coll));
- BOOST_ASSIGN_CHECK_EQUAL(a , a1);
- BOOST_ASSIGN_CHECK_EQUAL(b , b1);
- BOOST_ASSIGN_CHECK_EQUAL(c , c1);
- BOOST_ASSIGN_CHECK_EQUAL(d , d1);
- BOOST_ASSIGN_CHECK_EQUAL(e , e1);
- BOOST_ASSIGN_CHECK_EQUAL(f , f1);
- BOOST_ASSIGN_CHECK_EQUAL(g , g1);
- BOOST_ASSIGN_CHECK_EQUAL(h , h1);
-}
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_copy_iterator \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ boost::array<val_,8> ar; \
+ ar[0] = a; \
+ ar[1] = b; \
+ ar[2] = c; \
+ ar[3] = d; \
+ ar[4] = e; \
+ ar[5] = f; \
+ ar[6] = g; \
+ ar[7] = h; \
+ val_ a1, b1, c1, d1, e1, f1, g1, h1; \
+ BOOST_AUTO(tmp,BOOST_ASSIGN_AS_CHECK_ref8(a1,b1,c1,d1,e1,f1,g1,h1)); \
+ std::copy(boost::begin(ar),boost::end(ar),boost::begin(tmp)); \
+ BOOST_ASSIGN_CHECK_EQUAL(a , a1); \
+ BOOST_ASSIGN_CHECK_EQUAL(b , b1); \
+ BOOST_ASSIGN_CHECK_EQUAL(c , c1); \
+ BOOST_ASSIGN_CHECK_EQUAL(d , d1); \
+ BOOST_ASSIGN_CHECK_EQUAL(e , e1); \
+ BOOST_ASSIGN_CHECK_EQUAL(f , f1); \
+ BOOST_ASSIGN_CHECK_EQUAL(g , g1); \
+ BOOST_ASSIGN_CHECK_EQUAL(h , h1); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/fifo.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/fifo.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/fifo.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -15,32 +15,22 @@
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
- template<typename C,typename C1,typename T>
- void check_fifo(C& elems,const C1& coll,
- const T& a,const T& b,const T& c,const T& d,const T& e,const T& f,
- const T& g,const T& h
- )
- {
- elems = coll.to_adapter();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , a); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , b); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , c); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , d); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , e); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , f); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , g); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.front() , h); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.empty() , true);
- }
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_adapter_fifo(C) \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ \
+ C elems = BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h).to_adapter(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , a); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , b); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , c); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , d); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , e); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , f); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , g); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.front() , h); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.empty() , true); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/iterator.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/iterator.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/iterator.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -11,41 +11,30 @@
 #include <boost/typeof/typeof.hpp>
 #include <boost/next_prior.hpp>
 #include <boost/range.hpp>
-
+#include <iostream>
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage
-// check_iterator(list_of(a)(b)(c)(d)(e)(f)(g)(h),a,b,c,d,e,f,g,h);
-
-template<typename C1,typename T>
-void check_iterator(const C1& coll,
- const T& a,const T& b,const T& c, const T& d,const T& e,const T& f,
- const T& g,const T& h
-){
- BOOST_AUTO(it,boost::begin(coll));
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,0), a);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,1), b);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,2), c);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,3), d);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,4), e);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,5), f);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,6), g);
- BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,7), h);
- BOOST_ASSIGN_CHECK_EQUAL(boost::next(it,8), boost::end(coll));
-}
-
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_iterator \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ BOOST_AUTO(tmp,BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h)); \
+ \
+ BOOST_AUTO(it,boost::begin(tmp)); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,0), a); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,1), b); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,2), c); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,3), d); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,4), e); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,5), f); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,6), g); \
+ BOOST_ASSIGN_CHECK_EQUAL(*boost::next(it,7), h); \
+ BOOST_ASSIGN_CHECK_EQUAL(boost::next(it,8), boost::end(tmp)); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/lifo.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/lifo.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/lifo.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -8,39 +8,29 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_LIFO_ER_2010_HPP
 #define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_LIFO_ER_2010_HPP
-#include <set>
-#include <stdexcept>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
+#define BOOST_ASSIGN_AS_CHECK_adapter_lifo(C) \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ \
+ C elems = BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h).to_adapter(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , h); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , g); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , f); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , e); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , d); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , c); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , b); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.top() , a); elems.pop(); \
+ BOOST_ASSIGN_CHECK_EQUAL(elems.empty() , true); \
+} \
+/**/
 
- template<typename C,typename C1,typename T>
- void check_lifo(C& elems,const C1& coll,
- const T& a,const T& b,const T& c,const T& d,const T& e,const T& f,
- const T& g,const T& h
- )
- {
- elems = coll.to_adapter();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , h); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , g); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , f); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , e); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , d); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , c); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , b); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.top() , a); elems.pop();
- BOOST_ASSIGN_CHECK_EQUAL(elems.empty() , true);
- }
+#endif
 
-}// auto_size
-}// detail
-}// assign
-}// boost
 
-#endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/rebind_array.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/rebind_array.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/rebind_array.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -8,58 +8,34 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REBIND_ARRAY_ER_2010_HPP
 #define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REBIND_ARRAY_ER_2010_HPP
+#include <boost/assign/auto_size/check/constants.hpp>
 
 #ifndef BOOST_ASSIGN_CHECK_EQUAL
 #error
 #endif
 
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-// Usage
-// BOOST_AUTO(tmp1,ref_rebind_list_of(a)(b)(c));
-// BOOST_AUTO(tmp2,ref_rebind_list_of(d)(e)(f));
-// check_rebind_array(tmp1,tmp2,a,b,c,d,e,f);
-
-template<typename C,typename C1,typename T>
-void check_rebind_array(C& coll,C1& coll1,
- T& a, T& b, T& c,
- T& d, T& e, T& f
-){
- const T a1 = 1, b1 = 5, c1 = 3,
- d1 = 4, e1 = 2, f1 = 9;
- a = a1;
- b = b1;
- c = c1;
- d = d1;
- e = e1;
- f = f1;
- BOOST_ASSIGN_CHECK_EQUAL( coll[0] , a1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll[1] , b1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll[2] , c1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[0] , d1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[1] , e1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[2] , f1 );
- coll.swap(coll1);
- BOOST_ASSIGN_CHECK_EQUAL( coll[0] , d1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll[1] , e1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll[2] , f1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[0] , a1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[1] , b1 );
- BOOST_ASSIGN_CHECK_EQUAL( coll1[2] , c1 );
- BOOST_ASSIGN_CHECK_EQUAL( a , a1 );
- BOOST_ASSIGN_CHECK_EQUAL( b , b1 );
- BOOST_ASSIGN_CHECK_EQUAL( c , c1 );
- BOOST_ASSIGN_CHECK_EQUAL( d , d1 );
- BOOST_ASSIGN_CHECK_EQUAL( e , e1 );
- BOOST_ASSIGN_CHECK_EQUAL( f , f1 );
-}
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_rebind_array \
+{ \
+ typedef T val_; \
+ using namespace check_constants; \
+ val_ a1 = a, b1 = b, c1 = c, \
+ d1 = d, e1 = e, f1 = f; \
+ BOOST_AUTO(tmp1,BOOST_ASSIGN_AS_CHECK_ref_rebind3(a1, b1, c1)); \
+ BOOST_AUTO(tmp2,BOOST_ASSIGN_AS_CHECK_ref_rebind3(d1, e1, f1)); \
+ tmp1.swap(tmp2); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp1[0] , d ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp1[1] , e ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp1[2] , f ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp2[0] , a ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp2[1] , b ); \
+ BOOST_ASSIGN_CHECK_EQUAL( tmp2[2] , c ); \
+ BOOST_ASSIGN_CHECK_EQUAL( a , a1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( b , b1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( c , c1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( d , d1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( e , e1 ); \
+ BOOST_ASSIGN_CHECK_EQUAL( f , f1 ); \
+} \
+/**/
 
 #endif

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/check/ref_list_of.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -8,152 +8,49 @@
 //////////////////////////////////////////////////////////////////////////////
 #ifndef BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REF_LIST_OF_ER_2010_HPP
 #define BOOST_ASSIGN_DETAIL_AUTO_SIZE_CHECK_REF_LIST_OF_ER_2010_HPP
-#include <vector>
-#include <set>
-#include <list>
-#include <stack>
-#include <queue>
-#include <boost/array.hpp>
 #include <boost/assign/auto_size/ref_list_of.hpp>
 #include <boost/assign/auto_size/ref_rebind_list_of.hpp>
+#include <boost/assign/auto_size/check/all.hpp>
 
-#include <boost/assign/auto_size/check/array.hpp>
-#include <boost/assign/auto_size/check/adapter.hpp>
-#include <boost/assign/auto_size/check/converter.hpp>
-#include <boost/assign/auto_size/check/copy_array.hpp>
-#include <boost/assign/auto_size/check/copy_iterator.hpp>
-#include <boost/assign/auto_size/check/fifo.hpp>
-#include <boost/assign/auto_size/check/iterator.hpp>
-#include <boost/assign/auto_size/check/lifo.hpp>
-#include <boost/assign/auto_size/check/rebind_array.hpp>
-#include <boost/assign/auto_size/chain/mpl_check.hpp>
-#include <boost/assign/auto_size/check/chain.hpp>
-
-// Until range_ex avail.
-#include <boost/assign/auto_size/check/max_element.hpp>
-
-namespace boost{
-namespace assign{
-namespace detail{
-namespace auto_size{
-
-template<typename T>
-void check_ref_list_of()
-{
- typedef T val_;
- using namespace boost::assign;
- const val_
- a1 = 1, b1 = 5, c1 = 3,
- d1 = 4, e1 = 2, f1 = 9,
- g1 = 0, h1 = 7;
-
- {
- // ---- Example in the documentation
- val_ a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
- val_& max = *max_element( ref_list_of(a)(b)(c)(d)(e)(f)(g)(h) );
- BOOST_ASSIGN_CHECK_EQUAL( max , f );
- max = 8;
- BOOST_ASSIGN_CHECK_EQUAL( f , 8 );
- const val_& const_max = *max_element(
- cref_list_of(1)(5)(3)(d)(e)(f)(g)(h) );
- BOOST_ASSIGN_CHECK_EQUAL( max , const_max );
- }
- {
- check_iterator(
- cref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- check_array(
- cref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- val_ a, b, c, d, e, f, g, h;
- BOOST_AUTO(tmp,ref_list_of(a)(b)(c)(d)(e)(f)(g)(h));
- check_copy_iterator(
- tmp,
- a,b,c,d,e,f,g,h);
- }
- {
- val_ a, b, c, d, e, f;
- BOOST_AUTO(tmp1,ref_list_of(a)(b)(c));
- BOOST_AUTO(tmp2,ref_list_of(d)(e)(f));
- check_copy_array(
- tmp1,tmp2,
- a,b,c,d,e,f);
- }
- {
- val_ a, b, c, d, e, f;
- BOOST_AUTO(tmp1,ref_rebind_list_of(a)(b)(c));
- BOOST_AUTO(tmp2,ref_rebind_list_of(d)(e)(f));
- check_rebind_array(
- tmp1,
- tmp2,
- a,b,c,d,e,f);
- }
- {
- std::list<val_> elems;
- check_converter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- std::vector<val_> elems;
- check_converter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- boost::array<val_,8> elems;
- check_converter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- std::set<val_> elems;
- check_converter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- std::stack<val_> elems;
- check_adapter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- {
- std::queue<val_> elems;
- check_adapter(
- elems,
- ref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
- a1,b1,c1,d1,e1,f1,g1,h1);
- }
- boost::assign::detail::chain_mpl_check::compound();
- {
- val_ a, b, c, d, e, f, g, h;
- BOOST_AUTO(tmp1,ref_list_of(a)(b)(c)(d));
- check_chain(
- tmp1,
- cref_list_of(e)(f)(g)(h),
- a,b,c,d,e,f,g,h);
- }
-
- // TODO comparison operators
-
-}
-
-// TODO see how the checks can be aggregated with the unit_test
-
-}// auto_size
-}// detail
-}// assign
-}// boost
+#define BOOST_ASSIGN_AS_CHECK_ref1(a) ref_list_of(a)
+#define BOOST_ASSIGN_AS_CHECK_ref2(a,b) ref_list_of(a)(b)
+#define BOOST_ASSIGN_AS_CHECK_ref3(a,b,c) ref_list_of(a)(b)(c)
+#define BOOST_ASSIGN_AS_CHECK_ref4(a,b,c,d) ref_list_of(a)(b)(c)(d)
+#define BOOST_ASSIGN_AS_CHECK_ref5(a,b,c,d,e) ref_list_of(a)(b)(c)(d)(e)
+#define BOOST_ASSIGN_AS_CHECK_ref6(a,b,c,d,e,f) ref_list_of(a)(b)(c)(d)(e)(f)
+#define BOOST_ASSIGN_AS_CHECK_ref7(a,b,c,d,e,f,g) ref_list_of(a)(b)(c)(d)(e)(f)(g)
+#define BOOST_ASSIGN_AS_CHECK_ref8(a,b,c,d,e,f,g,h) ref_list_of(a)(b)(c)(d)(e)(f)(g)(h)
+
+#define BOOST_ASSIGN_AS_CHECK_cref1(a) cref_list_of(a)
+#define BOOST_ASSIGN_AS_CHECK_cref2(a,b) cref_list_of(a)(b)
+#define BOOST_ASSIGN_AS_CHECK_cref3(a,b,c) cref_list_of(a)(b)(c)
+#define BOOST_ASSIGN_AS_CHECK_cref4(a,b,c,d) cref_list_of(a)(b)(c)(d)
+#define BOOST_ASSIGN_AS_CHECK_cref5(a,b,c,d,e) cref_list_of(a)(b)(c)(d)(e)
+#define BOOST_ASSIGN_AS_CHECK_cref6(a,b,c,d,e,f) cref_list_of(a)(b)(c)(d)(e)(f)
+#define BOOST_ASSIGN_AS_CHECK_cref7(a,b,c,d,e,f,g) cref_list_of(a)(b)(c)(d)(e)(f)(g)
+#define BOOST_ASSIGN_AS_CHECK_cref8(a,b,c,d,e,f,g,h) cref_list_of(a)(b)(c)(d)(e)(f)(g)(h)
+
+#define BOOST_ASSIGN_AS_CHECK_ref_rebind3(a,b,c) ref_rebind_list_of(a)(b)(c)
+
+BOOST_ASSIGN_AS_CHECK_all(check_ref_list_of)
+
+#undef BOOST_ASSIGN_AS_CHECK_ref1
+#undef BOOST_ASSIGN_AS_CHECK_ref2
+#undef BOOST_ASSIGN_AS_CHECK_ref3
+#undef BOOST_ASSIGN_AS_CHECK_ref4
+#undef BOOST_ASSIGN_AS_CHECK_ref5
+#undef BOOST_ASSIGN_AS_CHECK_ref6
+#undef BOOST_ASSIGN_AS_CHECK_ref7
+#undef BOOST_ASSIGN_AS_CHECK_ref8
+
+#undef BOOST_ASSIGN_AS_CHECK_cref1
+#undef BOOST_ASSIGN_AS_CHECK_cref2
+#undef BOOST_ASSIGN_AS_CHECK_cref3
+#undef BOOST_ASSIGN_AS_CHECK_cref4
+#undef BOOST_ASSIGN_AS_CHECK_cref5
+#undef BOOST_ASSIGN_AS_CHECK_cref6
+#undef BOOST_ASSIGN_AS_CHECK_cref7
+#undef BOOST_ASSIGN_AS_CHECK_cref8
 
 #endif
 

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/comparison_op/crtp.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/comparison_op/crtp.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/comparison_op/crtp.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -188,7 +188,7 @@
 BOOST_ASSIGN_DETAIL_COMPARISON_OP( < , comparison_op::forward::less )
 BOOST_ASSIGN_DETAIL_COMPARISON_OP( > , comparison_op::forward::greater )
 BOOST_ASSIGN_DETAIL_COMPARISON_OP( <= , comparison_op::forward::less_equal )
-//BOOST_ASSIGN_DETAIL_COMPARISON_OP( >= , comparison_op::forward::greater_equal )
+BOOST_ASSIGN_DETAIL_COMPARISON_OP( >= , comparison_op::forward::greater_equal )
 
 }// comparison_op
 }// detail

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/csv.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/csv.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/csv.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -22,7 +22,7 @@
 //
 // Let n = BOOST_ASSIGN_CSV_SIZE and a1,...,an, objects of type T, Ref an alias
 // for BOOST_ASSIGN_CSV_ref, P0 = BOOST_ASSIGN_CSV_DEF_POLICY and r<U,N,P> an
-// alias for result_of::expr<U,N,Ref,P>::type
+// alias for BOOST_ASSIGN_CSV_RESULT(U,N,P)
 //
 // Usage:
 // BOOST_ASSIGN_CSV(fun) creates for i=1,...,n the following overloads:

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/detail/expr.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -14,6 +14,7 @@
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/equal_to.hpp>
 #include <boost/mpl/empty_base.hpp>
+#include <boost/mpl/identity.hpp>
 #include <boost/concept_check.hpp>
 #include <boost/iterator/iterator_concepts.hpp>
 #include <boost/next_prior.hpp>
@@ -28,8 +29,11 @@
 #include <boost/assign/auto_size/detail/types.hpp>
 #include <boost/assign/auto_size/detail/expr_size.hpp>
 #include <boost/assign/auto_size/detail/expr_elem.hpp>
+#include <boost/assign/auto_size/detail/fwd_expr.hpp>
 #include <boost/assign/auto_size/array/lazy.hpp>
 
+#include <iostream> // tmp
+
 // Creates a collection of references by deducing the number of arguments
 // at compile time. The functionality is controlled by parameter R which
 // specifies a reference wrapper, and P, an arbitrary policy, usually intended
@@ -63,21 +67,17 @@
     // P : policy
     // F : use reference to link to the previous collection
 
- template<typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- class expr;
-
     // ---- describe ---- //
     
     template<typename E,typename T,
- template<typename> class R,typename P,typename F,bool F>
- void describe(std::ostream& os,const expr<E,T,1,R,P,F>& e){
+ template<typename> class R,typename P>
+ void describe(std::ostream& os,const expr<E,T,1,R,P>& e){
             os << e.ref;
     }
 
     template<typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void describe(std::ostream& os,const expr<E,T,N,R,P,F>& e){
+ template<typename> class R,typename P>
+ void describe(std::ostream& os,const expr<E,T,N,R,P>& e){
             describe(os,e.previous);
             os << ',' << e.ref;
     }
@@ -85,25 +85,189 @@
     // ---- Traits ---- //
     
     template<typename E,typename T,int N,
- template<typename>class R,typename P,bool F>
- struct expr_size<expr<E,T,N,R,P,F> >
+ template<typename>class R,typename P>
+ struct expr_size<expr<E,T,N,R,P> >
              : boost::mpl::int_<N>{};
 
     template<typename E,typename T,int N,
- template<typename>class R,typename P,bool F>
- struct expr_elem<expr<E,T,N,R,P,F> >
+ template<typename>class R,typename P>
+ struct expr_elem<expr<E,T,N,R,P> >
     {
             typedef T type;
     };
 
- namespace result_of{
-
- // Assumes F is set to default
- template<typename T,int N,template<typename> class R,typename P>
- struct expr;
+ // ---- Collection builder ---- //
+
+ template<typename E,typename T,int N,
+ template<typename> class R,typename P>
+ class expr : public policy<P>::template apply<expr<E,T,N,R,P>,R>::type{
+ typedef boost::mpl::int_<1> int_1_;
+ typedef boost::mpl::int_<N> int_n_;
+ typedef typename R<T>::type ref_;
+ typedef typename policy<P>::template apply<expr,R>::type super_;
+
+ template<typename E1>
+ struct next{
+ typedef expr<E1,T,N+1,R,P> type;
+ };
+
+ public:
+
+ typedef detail::assign_reference_copy<const E> ref_to_previous_;
+ typedef typename boost::mpl::equal_to<int_n_,int_1_>::type is_first_;
+ typedef typename boost::mpl::if_<
+ is_first_,E,ref_to_previous_>::type previous_;
+ typedef typename next<expr>::type result_type;
+
+ explicit expr(const E& p,T& t):previous(p),ref(t){}
+ // Needed by csv.hpp :
+ template<typename E1,typename P1>
+ explicit expr(const expr<E1,T,N,R,P1>& that)
+ :super_(that)
+ ,previous(that.previous)
+ ,ref(that.ref){}
 
+ result_type operator()(T& t)const{ return result_type(*this,t); }
+
+ //private:
+ //template<int Nshift,typename A,typename E1,int N1>
+ //friend void write_to_array(A& a,const expr<E1,T,N1,R,P>& e,false_);
+
+ //template<int Nshift,typename A,typename E1,int N1>
+ //friend void write_to_array(A& a,const expr<E1,T,N1,R,P>& e,true_);
+
+ //template<int Nshift,typename A,typename E1,int N1>
+ //friend void write_to_array(A& a,const expr<E1,T,N1,R,P>& e);
+
+ mutable previous_ previous;
+ mutable ref_ ref;
+
+// expr();
+
+ };
+
+ // ---- write_to_array ---- //
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e,false_ /*exit*/){
+ a[Nshift+N-1] = e.ref;
+ write_to_array<Nshift>(a,e.previous.get_ref());
     }
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e,true_ /*exit*/){
+ a[Nshift+N-1] = e.ref;
+ }
+
+ template<int Nshift,typename A,typename E,typename T,int N,
+ template<typename> class R,typename P>
+ void write_to_array(A& a,const expr<E,T,N,R,P>& e){
+ typedef expr<E,T,N,R,P> expr_;
+ typedef typename expr_::is_first_ exit_;
+ write_to_array<Nshift>(a,e,exit_());
+ }
+
+ // ---- ref wrappers ---- //
+
+ template<typename T>
+ struct ref_copy{
+ typedef boost::assign::detail::assign_reference_copy<T> type;
+ };
+
+ template<typename T>
+ struct ref_rebind{
+ typedef boost::assign::detail::assign_reference_rebind<T> type;
+ };
+
+ // ---- first expr ---- //
+
+ template<typename T,template<typename> class R,typename P>
+ struct first_expr{
+ typedef detail::auto_size::expr<detail::auto_size::top_,T,1,R,P> type;
+ static type call(T& a){ return type(top_(),a); }
+ };
+
+ template<typename T,template<typename> class R>
+ struct first_expr_no_policy : first_expr<T,R,no_policy>{};
+
+ template<template<typename> class R,typename T>
+ typename first_expr_no_policy<T,R>::type
+ make_first_expr_no_policy(T& a){
+ return first_expr_no_policy<T,R>::call(a);
+ }
+
+ template<template<typename> class R,typename T>
+ typename first_expr_no_policy<const T,R>::type
+ make_first_expr_no_policy(const T& a){
+ return first_expr_no_policy<const T,R>::call(a);
+ }
+
+ template<typename T,typename P = default_policy>
+ struct first_copy : first_expr<T,ref_copy,P>{};
+
+ template<typename T,typename P = default_policy>
+ struct first_rebind : first_expr<T,ref_rebind,P>{};
+
+ // ---- n_th_expr ---- //
+
+namespace meta{
+namespace impl{
+ template<int N>
+ struct n_th_expr{
+
+ template<typename T,template<typename> class R,typename P>
+ struct apply
+ {
+ typedef impl::n_th_expr<N-1> meta_;
+ typedef typename meta_::template apply<T,R,P> apply_;
+ typedef typename apply_::type::result_type type;
+ };
+
+ };
+ template<>
+ struct n_th_expr<1>{
+
+ template<typename T,template<typename> class R,typename P>
+ struct apply : first_expr<T,R,P>{};
+
+ };
+
+}//impl
+
+ template<typename T,template<typename> class R,typename P = default_policy>
+ struct n_th_expr{
+
+ template<int N>
+ struct apply : impl::n_th_expr<N>::template apply<T,R,P>
+ {};
+
+ };
+
+ template<typename T,typename P = default_policy>
+ struct n_th_expr_copy : meta::n_th_expr<T,ref_copy,P>{};
+
+ template<typename T,typename P = default_policy>
+ struct n_th_expr_rebind : meta::n_th_expr<T,ref_rebind,P>{};
 
+}// meta
+
+ template<typename T,template<typename> class R,int N,
+ typename P = default_policy>
+ struct n_th_expr
+ : meta::n_th_expr<T,R,P>::template apply<N>{};
+
+ template<typename T,int N, typename P = default_policy>
+ struct n_th_expr_copy
+ : meta::n_th_expr_copy<T,P>::template apply<N>{};
+
+ template<typename T,int N, typename P = default_policy>
+ struct n_th_expr_rebind
+ : meta::n_th_expr_rebind<T,P>::template apply<N>{};
+
+// Older stuff to be phased out
+/*
     // ---- insert_range ---- //
 
     namespace result_of{
@@ -140,26 +304,6 @@
         return result_::call(e,i);
     }
 
- // ---- Collection builder ---- //
-
- template<typename E,typename T,int N,
- template<typename> class R,typename P,bool F = true>
- class expr : public policy<P>::template apply<expr<E,T,N,R,P,F>,R>::type{
- typedef boost::mpl::int_<1> int_1_;
- typedef boost::mpl::int_<N> int_n_;
- typedef typename R<T>::type ref_;
- typedef typename policy<P>::template apply<expr,R>::type super_;
-
- template<typename E1>
- struct next{
- typedef expr<E1,T,N+1,R,P,true> type;
- };
-
- template<typename E1>
- struct alt_next{
- // necessary for insert_range
- typedef expr<E1,T,N+1,R,P,false> type;
- };
 
         typedef typename boost::mpl::if_c<F,const E&,E>::type storage_;
 
@@ -175,12 +319,13 @@
         struct result_of_range3 : result_of_range2<
             auto_size::static_size<
                 typename boost::remove_const<Range>::type>::value, Range>{};
-
         public:
 
- typedef typename boost::mpl::equal_to<int_n_,int_1_>::type is_first_;
         typedef typename boost::mpl::if_<is_first_,E,storage_>::type previous_;
+ typedef typename boost::mpl::equal_to<int_n_,int_1_>::type is_first_;
+ typedef typename boost::mpl::if_<is_first_,E,ref_to_previous_>::type previous_;
         typedef typename next<expr>::type result_type;
+
         typedef typename alt_next<expr>::type alt_result_type;
 
         explicit expr(const E& p,T& t):previous(p),ref(t){}
@@ -188,10 +333,12 @@
         template<typename E1,typename P1,bool F1>
         explicit expr(const expr<E1,T,N,R,P1,F1>& that)
             :super_(that)
- ,previous(that.previous)
+ ,previous(that.previous)
             ,ref(that.ref){}
 
         result_type operator()(T& t)const{ return result_type(*this,t); }
+
+ // ---- range() ----
         alt_result_type alt(T& t)const{ return alt_result_type(*this,t); }
         
         template<int K,typename I>
@@ -237,107 +384,8 @@
         range(const Range& r){
             return this->range<auto_size::static_size<Range>::value>(r);
         }
+*/
 
- mutable previous_ previous;
- mutable ref_ ref;
-
- private:
- expr();
-
- };
-
- // ---- write_to_array ---- //
-
- // Some library extension may one day need Nshift, but not at present
- template<int Nshift,typename A,typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void write_to_array(A& a,const expr<E,T,N,R,P,F>& e,false_ /*exit*/){
- a[Nshift+N-1] = e.ref;
- write_to_array(a,e.previous);
- }
-
- template<int Nshift,typename A,typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void write_to_array(A& a,const expr<E,T,N,R,P,F>& e,true_ /*exit*/){
- a[Nshift+N-1] = e.ref;
- }
-
- template<int Nshift,typename A,typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void write_to_array(A& a,const expr<E,T,N,R,P,F>& e){
- typedef expr<E,T,N,R,P,F> expr_;
- typedef typename expr_::is_first_ exit_;
- write_to_array<Nshift>(a,e,exit_());
- }
-
- template<typename A,typename E,typename T,int N,
- template<typename> class R,typename P,bool F>
- void write_to_array(A& a,const expr<E,T,N,R,P,F>& e){
- return write_to_array<0>(a,e);
- }
-
- // ---- ref wrappers ---- //
-
- template<typename T>
- struct ref_copy{
- typedef boost::assign::detail::assign_reference_copy<T> type;
- };
-
- template<typename T>
- struct ref_rebind{
- typedef boost::assign::detail::assign_reference_rebind<T> type;
- };
-
- // ---- first expr ---- //
-
- template<typename T,template<typename> class R,typename P>
- struct first_expr{
- typedef detail::auto_size::expr<detail::auto_size::top_,T,1,R,P> type;
- static type call(T& a){ return type(top_(),a); }
- };
-
- template<typename T,template<typename> class R>
- struct first_expr_no_policy : first_expr<T,R,no_policy>{};
-
- template<template<typename> class R,typename T>
- typename first_expr_no_policy<T,R>::type
- make_first_expr_no_policy(T& a){
- return first_expr_no_policy<T,R>::call(a);
- }
-
- template<template<typename> class R,typename T>
- typename first_expr_no_policy<const T,R>::type
- make_first_expr_no_policy(const T& a){
- return first_expr_no_policy<const T,R>::call(a);
- }
-
- template<typename T,typename P = default_policy>
- struct first_copy : first_expr<T,ref_copy,P>{};
-
- template<typename T,typename P = default_policy>
- struct first_rebind : first_expr<T,ref_rebind,P>{};
-
- // ---- result_of ---- //
-
- namespace result_of{
- template<typename T,int N,
- template<typename> class R,typename P>
- struct expr{
- typedef typename result_of::expr<T,N-1,R,P>::type previous;
- typedef auto_size::expr<previous,T,N,R,P> type;
- };
-
- template<typename T,template<typename> class R,typename P>
- struct expr<T,1,R,P> : first_expr<T,R,P>{};
-
- template<typename T,int N,typename P = default_policy>
- struct copy : result_of::expr<T,N,ref_copy,P>{};
-
- template<typename T,int N,typename P = default_policy>
- struct rebind : result_of::expr<T,N,ref_rebind,P>{};
-
- }
-
 }// auto_size
 }// detail
 }// assign

Modified: sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp
==============================================================================
--- sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp (original)
+++ sandbox/statistics/detail/assign/boost/assign/auto_size/reference_wrapper/copy.hpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -58,13 +58,13 @@
 
     };
 
- // Added by ER March 10, 2010
+ // Added by ER March 10 :
+
         template<typename T>
         void rebind(assign_reference_copy<T>& a,T& r){
             a.rebind(r);
     }
 
- // Added by ER March 7, 2010
     template< class T >
     inline bool operator<( const assign_reference_copy<T>& l,
                            const assign_reference_copy<T>& r )

Modified: sandbox/statistics/detail/assign/libs/assign/example/chain.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/chain.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/chain.cpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -9,13 +9,15 @@
 #include <boost/typeof/typeof.hpp>
 #include <boost/next_prior.hpp>
 #include <boost/range/algorithm/copy.hpp>
-#include <boost/ref.hpp>
 #include <boost/assign/auto_size/ref_list_of.hpp>
-#include <boost/assign/auto_size/ref_csv.hpp>
-#include <boost/assign/auto_size/reference_wrapper/conversion_traits.hpp>
-#include <boost/assign/auto_size/chain/convert_range.hpp>
+#include <boost/assign/auto_size/detail/expr.hpp>
+//#include <boost/assign/auto_size/reference_wrapper/conversion_traits.hpp>
+//#include <boost/assign/auto_size/chain/convert_range.hpp>
 #include <boost/assign/auto_size/chain/chain_convert.hpp>
-#include <boost/assign/auto_size/comparison_op/crtp.hpp>
+//#include <boost/assign/auto_size/comparison_op/crtp.hpp>
+
+//#include <boost/assign/auto_size/check/ref_list_of_caller.hpp> // tmp
+
 #include <libs/assign/example/chain.h>
 
 void example_chain(std::ostream& os)
@@ -28,8 +30,7 @@
         os << "-> example_chain: " << std::endl;
     typedef int val_;
         val_ a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8, i = 9 ;
-// typedef boost::array<val_,4> ar_;
- typedef boost::array<val_,1> ar_;
+ typedef boost::array<val_,4> ar_;
     typedef std::vector<val_> vec_;
     ar_ ar1; ar1.assign( -1 );
     ar_ ar2; ar2.assign( 0 );
@@ -39,6 +40,7 @@
         BOOST_AUTO(tmp1,ref_list_of(a)(b)(c)(d));
         BOOST_AUTO(tmp2,ref_list_of(e)(f)(g)(h));
 
+/*
     boost::copy(
         chain_convert_r(tmp2)(ar4)(ar5),
         std::ostream_iterator<val_>(os," ")
@@ -73,7 +75,7 @@
    // boost::chain(tmp2,ar4)
    // )
    //);
-
+*/
         os << "<- " << std::endl;
     
 }

Modified: sandbox/statistics/detail/assign/libs/assign/src/main.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/src/main.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/src/main.cpp 2010-03-19 00:21:26 EDT (Fri, 19 Mar 2010)
@@ -1,16 +1,18 @@
 #include <iostream>
 #define BOOST_ASSIGN_CHECK_EQUAL(a,b) BOOST_ASSERT(a==b)
 #include <boost/assign/auto_size/check/ref_list_of.hpp>
-#include <boost/assign/auto_size/check/ref_csv.hpp>
+//#include <boost/assign/auto_size/check/ref_csv.hpp>
 #undef BOOST_ASSIGN_CHECK_EQUAL
 #include <libs/assign/example/chain.h>
 
 int main (int argc, char * const argv[]) {
 
- //boost::assign::detail::auto_size::check_ref_list_of<int>();
- //std::cout << "check_ref_list_of : ok" << std::endl;
- //boost::assign::detail::auto_size::check_ref_csv<int>();
- //std::cout << "check_ref_csv : ok" << std::endl;
+ using namespace boost::assign::detail::auto_size;
+
+ check_ref_list_of<int>();
+ // std::cout << "check_ref_list_of : ok" << std::endl;
+ // boost::assign::detail::auto_size::check_ref_csv<int>();
+ // std::cout << "check_ref_csv : ok" << std::endl;
 
     example_chain(std::cout);
 


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