|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r60660 - in sandbox/statistics/detail/assign: boost/assign/auto_size/array libs/assign/doc libs/assign/example
From: erwann.rogard_at_[hidden]
Date: 2010-03-16 19:12:48
Author: e_r
Date: 2010-03-16 19:12:47 EDT (Tue, 16 Mar 2010)
New Revision: 60660
URL: http://svn.boost.org/trac/boost/changeset/60660
Log:
m
Text files modified:
sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp | 18 ++++++++++++------
sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt | 2 ++
sandbox/statistics/detail/assign/libs/assign/example/chain.cpp | 6 ++++--
3 files changed, 18 insertions(+), 8 deletions(-)
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-16 19:12:47 EDT (Tue, 16 Mar 2010)
@@ -12,8 +12,8 @@
#include <boost/mpl/bool.hpp>
#include <boost/array.hpp>
#include <boost/range.hpp>
-#include <boost/assign/auto_size/array/comparison.hpp>
-#include <boost/assign/list_of.hpp> // for assign_detail::converter
+//#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>
@@ -48,10 +48,16 @@
// d1.ref_array_impl() array_interface::ref_array_&
// d2.ref_array_impl() array_interface::const ref_array_&
template<typename T,std::size_t N,template<typename> class R,typename D>
- class array_interface : public assign_detail::converter<
- array_interface<T,N,R,D>,
- typename array_interface_traits<T,N,R>::const_iterator
- >
+ class array_interface
+ : public
+ auto_size::converter<
+ array_interface<T,N,R,D>,
+ typename array_interface_traits<T,N,R>::const_iterator
+ >
+// assign_detail::converter<
+// array_interface<T,N,R,D>,
+// typename array_interface_traits<T,N,R>::const_iterator
+// >
{
typedef array_interface_traits<T,N,R> traits;
typedef typename traits::ref_ ref_;
Modified: sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt (original)
+++ sandbox/statistics/detail/assign/libs/assign/doc/revision_history.txt 2010-03-16 19:12:47 EDT (Tue, 16 Mar 2010)
@@ -1,5 +1,7 @@
// Revision history:
//
+// March 16, 2010 : Added a crtp CT allowing comparison operators to work
+// between one derived class and either another or a non-derived.
// March 14, 2010 : Made the chain interface similar to list_of as per MPG idea.
// March 11, 2010 : Added range conversion and a chain_convert function.
// March 8, 2010 : Added a policy dispatcher, csv_policy, to allow a common
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-16 19:12:47 EDT (Tue, 16 Mar 2010)
@@ -15,6 +15,7 @@
#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 <libs/assign/example/chain.h>
void example_chain(std::ostream& os)
@@ -27,7 +28,8 @@
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_,4> ar_;
+ typedef boost::array<val_,1> ar_;
typedef std::vector<val_> vec_;
ar_ ar1; ar1.assign( -1 );
ar_ ar2; ar2.assign( 0 );
@@ -36,7 +38,7 @@
ar_ ar5; ar5.assign( 3 );
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," ")
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