Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60392 - in sandbox/statistics/detail/assign: boost/assign/auto_size/array libs/assign/example libs/assign/src libs/assign/test
From: erwann.rogard_at_[hidden]
Date: 2010-03-09 19:20:08


Author: e_r
Date: 2010-03-09 19:20:07 EST (Tue, 09 Mar 2010)
New Revision: 60392
URL: http://svn.boost.org/trac/boost/changeset/60392

Log:
m
Removed:
   sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.h
Text files modified:
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/interface.hpp | 2
   sandbox/statistics/detail/assign/boost/assign/auto_size/array/lazy.hpp | 2
   sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp | 307 ++++++++++-----------------------------
   sandbox/statistics/detail/assign/libs/assign/src/main.cpp | 16 -
   sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp | 181 +++++++++++-----------
   5 files changed, 178 insertions(+), 330 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-09 19:20:07 EST (Tue, 09 Mar 2010)
@@ -79,7 +79,7 @@
                 
         reference operator[](size_type i){ return (this->ref_array())[i]; }
         const_reference operator[](size_type i)const{
- return (this->array())[i]; }
+ return (this->ref_array())[i]; }
                         
         reference front(){ return (this->ref_array()).front(); }
         const_reference front() const{ return (this->ref_array()).front(); }

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-09 19:20:07 EST (Tue, 09 Mar 2010)
@@ -79,8 +79,6 @@
         
         private:
         typedef boost::shared_ptr<ref_array_> smart_ptr_;
- // Only the last of N expressions needs to instantiate an array,
- // hence a pointer.
         mutable smart_ptr_ ptr;
 
     };

Modified: sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.cpp 2010-03-09 19:20:07 EST (Tue, 09 Mar 2010)
@@ -1,263 +1,118 @@
 //////////////////////////////////////////////////////////////////////////////
-// example::ref_list_of.cpp //
+// assign::detail::auto_size::chec_ref_list_of.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) //
 //////////////////////////////////////////////////////////////////////////////
-#include <boost/detail/workaround.hpp>
+#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 <algorithm>
-#include <iostream>
-#include <boost/typeof/typeof.hpp>
 #include <boost/array.hpp>
-#include <boost/range.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/include.hpp>
 
-template< class Range >
-void print( const Range& r )
-{
- std::cout << "\n printing " << typeid(r).name() << " \n";
- std::cout << "\n";
-
- typedef typename boost::range_iterator<const Range>::type it_;
-
- for(it_ i = r.begin(), e = r.end();
- i !=e; ++i )
- std::cout << " " << *i;
-}
+namespace boost{
+namespace assign{
+namespace detail{
+namespace auto_size{
 
-template< class Range >
-void sort( const Range& r )
+template<typename T>
+void check_ref_list_of(std::ostream& os)
 {
- std::cout << "\n sorting " << typeid(r).name() << " \n";
- std::sort( r.begin(), r.end() );
- print( r );
-}
-
-template< class Range, class Pred >
-void sort( const Range& r, Pred pred )
-{
- std::cout << "\n sorting " << typeid(r).name() << " \n";
- std::sort( r.begin(), r.end(), pred );
- print( r );
-}
-
-template< class Range >
-typename Range::const_iterator max_element( const Range& r )
-{
- return std::max_element( r.begin(), r.end() );
-}
-
-template<typename C>
-void check_converter(C& elems,bool sorted = false){
- using namespace boost::assign;
- int a=1, b=5, c=3, d=4, e=2, f=9, g=0, h=7;
- BOOST_AUTO(tmp,cref_list_of(a)(b)(c)(d)(e)(f)(g)(h));
- elems = tmp;
- elems == tmp;
- elems >= tmp;
- tmp == elems;
- tmp <= elems;
- typedef typename boost::range_iterator<const C>::type it_;
- it_ it = boost::begin(elems);
- if(!sorted){
- BOOST_ASSERT(*it == a); ++it;
- BOOST_ASSERT(*it == b); ++it;
- BOOST_ASSERT(*it == c); ++it;
- BOOST_ASSERT(*it == d); ++it;
- BOOST_ASSERT(*it == e); ++it;
- BOOST_ASSERT(*it == f); ++it;
- BOOST_ASSERT(*it == g); ++it;
- BOOST_ASSERT(*it == h); ++it;
- BOOST_ASSERT(it == boost::end(elems));
- }else{
- BOOST_ASSERT(*it == 0); ++it;
- BOOST_ASSERT(*it == 1); ++it;
- BOOST_ASSERT(*it == 2); ++it;
- BOOST_ASSERT(*it == 3); ++it;
- BOOST_ASSERT(*it == 4); ++it;
- BOOST_ASSERT(*it == 5); ++it;
- BOOST_ASSERT(*it == 7); ++it;
- BOOST_ASSERT(*it == 9); ++it;
- BOOST_ASSERT(it == boost::end(elems));
- }
-}
-
-void example_ref_list_of(std::ostream& os)
-{
- os << "->example_ref_list_of : ";
-
+ typedef T val_;
     using namespace boost::assign;
- const int
+ const val_
             a1 = 1, b1 = 5, c1 = 3,
             d1 = 4, e1 = 2, f1 = 9,
             g1 = 0, h1 = 7, i1 = 8;
- // ---- Examples in the documentation
     {
- int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
- {
- int& max = *max_element( ref_list_of(a)(b)(c)(d)(e)(f)(g)(h) );
+ // ---- Examples 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_ASSERT( max == f );
             max = 8;
             BOOST_ASSERT( f == 8 );
- const int& const_max = *max_element(
+ const val_& const_max = *max_element(
                 cref_list_of(1)(5)(3)(d)(e)(f)(g)(h) );
             BOOST_ASSERT( max == const_max );
- }
     }
- // ---- Copy semantics
- { // As right operand (iterators + array)
- int a=a1, d=d1, e=e1, f=f1, g=g1, h=h1;
- BOOST_AUTO(tmp,cref_list_of(1)(5)(3)(d)(e)(f)(g)(h));
- BOOST_AUTO(it,boost::begin(tmp));
- BOOST_ASSERT(*it == a); it = boost::next(it,7);
- BOOST_ASSERT(*it == h); ++it;
- BOOST_ASSERT(it == boost::end(tmp));
- BOOST_ASSERT( tmp.size() == 8 );
- BOOST_ASSERT( tmp.empty() == false );
- BOOST_ASSERT( tmp[0] == a );
- BOOST_ASSERT( tmp[7] == h );
- BOOST_ASSERT( tmp.front() == a );
- BOOST_ASSERT( tmp.back() == h );
- }
- { // As left operand (iterators)
- int a, b, c,
- d, e, f,
- g, h, i;
- BOOST_AUTO(tmp1,cref_list_of
- (a1)(b1)(c1)
- (d1)(e1)(f1)
- (g1)(h1)(i1));
- BOOST_AUTO(tmp2,ref_list_of
- (a)(b)(c)
- (d)(e)(f)
- (g)(h)(i));
- std::copy(boost::begin(tmp1),boost::end(tmp1),boost::begin(tmp2));
- BOOST_ASSERT(a == a1);
- BOOST_ASSERT(b == b1);
- BOOST_ASSERT(c == c1);
- BOOST_ASSERT(d == d1);
- BOOST_ASSERT(e == e1);
- BOOST_ASSERT(f == f1);
- BOOST_ASSERT(g == g1);
- BOOST_ASSERT(h == h1);
- BOOST_ASSERT(i == i1);
- }
- { // As left operand (array)
- int a=a1, b=b1, c=c1,
- d=d1, e=e1, f=f1,
- g=g1, h=h1, i=i1;
- BOOST_AUTO(tmp1,ref_list_of(a)(b)(c));
- BOOST_AUTO(tmp2,ref_list_of(d)(e)(f));
- BOOST_AUTO(tmp3,ref_list_of(g)(h)(i));
- tmp1.swap(tmp2);
- BOOST_ASSERT( a == d1 );
- BOOST_ASSERT( b == e1 );
- BOOST_ASSERT( c == f1 );
- BOOST_ASSERT( d == a1 );
- BOOST_ASSERT( e == b1 );
- BOOST_ASSERT( f == c1 );
- tmp3.assign(0);
- BOOST_ASSERT( g == 0 );
- BOOST_ASSERT( h == 0 );
- BOOST_ASSERT( i == 0 );
- }
- // ---- Rebind semantics
- { // As left operand
- int a=a1, b=b1, c=c1,
- d=d1, e=e1, f=f1,
- g=g1, h=h1, i=i1;
- BOOST_AUTO(tmp1,ref_rebind_list_of(a)(b)(c));
- BOOST_AUTO(tmp2,ref_rebind_list_of(d)(e)(f));
- BOOST_AUTO(tmp3,cref_rebind_list_of(g)(h)(i));
- tmp1.swap(tmp2);
- BOOST_ASSERT( tmp1[0] == d );
- BOOST_ASSERT( tmp1[1] == e );
- BOOST_ASSERT( tmp1[2] == f );
- BOOST_ASSERT( tmp2[0] == a );
- BOOST_ASSERT( tmp2[1] == b );
- BOOST_ASSERT( tmp2[2] == c );
- BOOST_ASSERT( a == a1 );
- BOOST_ASSERT( b == b1 );
- BOOST_ASSERT( c == c1 );
- BOOST_ASSERT( d == d1 );
- BOOST_ASSERT( e == e1 );
- BOOST_ASSERT( f == f1 );
- tmp3.assign(d);
- BOOST_ASSERT( tmp3[0] == d );
- BOOST_ASSERT( tmp3[0] == d );
- BOOST_ASSERT( tmp3[0] == d );
- BOOST_ASSERT( g == g1 );
- BOOST_ASSERT( h == h1 );
- BOOST_ASSERT( i == i1 );
+ {
+ check_iterator<val_>(cref_list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
+ a1,b1,c1,d1,e1,f1,g1,h1);
+ }
+ {
+ check_array<val_>(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;
+ check_copy_iterator<val_>(
+ ref_list_of(a)(b)(c),
+ ref_list_of(d)(e)(f),
+ a,b,c,d,e,f)
+ check_copy_array<val_>(
+ ref_list_of(a)(b)(c),
+ ref_list_of(d)(e)(f),
+ a,b,c,d,e,f)
     }
- // ---- Concatenate ranges
     {
- boost::array<int,4> array; array.assign(d1);
- int a=a1, b=b1, c=c1;
-
- BOOST_ASSERT(boost::size(cref_list_of(a)(b)(c).range(array))==7u);
-
- //BOOST_AUTO(tmp,boost::chain(cref_list_of(a)(b)(c),array));
- //BOOST_ASSERT(boost::size(tmp)== 7u);
- //*tmp.begin(); // Fails to compile
+ val_ a, b, c, d, e, f;
+ check_rebind_array(
+ ref_rebind_list_of(a)(b)(c),
+ ref_rebind_list_of(d)(e)(f),
+ a,b,c,d,e,f);
+ }
+ {
+ std::list<val_> elems;
+ check_converter(
+ elems,
+ 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,
+ 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,
+ list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
+ a1,b1,c1,d1,e1,f1,g1,h1);
     }
- // ---- Range conversion
     {
- {
- std::list<int> elems;
- check_converter(elems);
- }
- {
- std::set<int> elems;
- check_converter(elems,true);
- }
- {
- std::vector<int> elems;
- check_converter(elems);
- }
- {
- boost::array<int,8> elems;
- check_converter(elems);
- }
+ boost::array<val_,8> elems;
+ check_converter(
+ elems,
+ list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
+ a1,b1,c1,d1,e1,f1,g1,h1);
     }
- // ---- Adapters
     {
- {
- std::stack<int> elems;
- int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
- elems = cref_list_of(a)(b)(c)(d)(e)(f)(g)(h).to_adapter();
- BOOST_ASSERT(elems.top() == h); elems.pop();
- BOOST_ASSERT(elems.top() == g); elems.pop();
- BOOST_ASSERT(elems.top() == f); elems.pop();
- BOOST_ASSERT(elems.top() == e); elems.pop();
- BOOST_ASSERT(elems.top() == d); elems.pop();
- BOOST_ASSERT(elems.top() == c); elems.pop();
- BOOST_ASSERT(elems.top() == b); elems.pop();
- BOOST_ASSERT(elems.top() == a); elems.pop();
- BOOST_ASSERT(elems.empty() == true);
- }
- {
- std::queue<int> elems;
- int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
- elems = cref_list_of(a)(b)(c)(d)(e)(f)(g)(h).to_adapter();
- BOOST_ASSERT(elems.front() == a); elems.pop();
- BOOST_ASSERT(elems.front() == b); elems.pop();
- BOOST_ASSERT(elems.front() == c); elems.pop();
- BOOST_ASSERT(elems.front() == d); elems.pop();
- BOOST_ASSERT(elems.front() == e); elems.pop();
- BOOST_ASSERT(elems.front() == f); elems.pop();
- BOOST_ASSERT(elems.front() == g); elems.pop();
- BOOST_ASSERT(elems.front() == h); elems.pop();
- BOOST_ASSERT(elems.empty() == true);
- }
+ std::stack<val_> elems;
+ check_adapter(
+ elems,
+ 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,
+ list_of(a1)(b1)(c1)(d1)(e1)(f1)(g1)(h1),
+ a1,b1,c1,d1,e1,f1,g1,h1);
     }
- os << "<-" << std::endl;
 }
+
+#endif
+
+

Deleted: sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.h
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/example/ref_list_of.h 2010-03-09 19:20:07 EST (Tue, 09 Mar 2010)
+++ (empty file)
@@ -1,16 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// example::ref_list_of.h //
-// //
-// (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 LIBS_ASSIGN_EXAMPLE_REF_LIST_OF_ER_2010_HPP
-#define LIBS_ASSIGN_EXAMPLE_REF_LIST_OF_ER_2010_HPP
-#include <ostream>
-
-
-void example_ref_list_of(std::ostream&);
-
-#endif
\ No newline at end of file

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-09 19:20:07 EST (Tue, 09 Mar 2010)
@@ -1,17 +1,13 @@
 #include <iostream>
-#include <libs/assign/example/ref_list_of.h>
-#include <libs/assign/example/ref_csv.h>
-#include <libs/assign/test/speed.h>
-//#include <libs/assign/test/speed2.h>
-//#include <libs/assign/test/ref_list_of.h>
+#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>
+#undef BOOST_ASSIGN_CHECK_EQUAL
 
 int main (int argc, char * const argv[]) {
 
- example_ref_list_of(std::cout);
- example_ref_csv(std::cout);
- test_speed(std::cout);
- //test_speed2(std::cout);
- //check_ref_list_of();
+ boost::assign::detail::auto_size::check_ref_list_of<int>();
+ boost::assign::detail::auto_size::check_ref_csv<int>();
 
     return 0;
 

Modified: sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp
==============================================================================
--- sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp (original)
+++ sandbox/statistics/detail/assign/libs/assign/test/ref_list_of.cpp 2010-03-09 19:20:07 EST (Tue, 09 Mar 2010)
@@ -27,7 +27,6 @@
 #include <boost/assign/auto_size/ref_list_of.hpp>
 #include <boost/assign/auto_size/ref_rebind_list_of.hpp>
 #include <boost/test/test_tools.hpp>
-#include <libs/assign/test/ref_list_of.h>
 
 template< class Range >
 void print( const Range& r )
@@ -54,32 +53,32 @@
     int a=1, b=5, c=3, d=4, e=2, f=9, g=0, h=7;
     BOOST_AUTO(tmp,cref_list_of(a)(b)(c)(d)(e)(f)(g)(h));
     elems = tmp;
- elems == tmp;
- elems >= tmp;
- tmp == elems;
- tmp <= elems;
+ BOOST_CHECK_EQUAL(elems == tmp,true);
+ BOOST_CHECK_EQUAL(elems >= tmp,true);
+ BOOST_CHECK_EQUAL(tmp == elems,true);
+ BOOST_CHECK_EQUAL(tmp <= elems,true);
     typedef typename boost::range_iterator<const C>::type it_;
     it_ it = boost::begin(elems);
     if(!sorted){
- BOOST_CHECK_EQUAL(*it == a); ++it;
- BOOST_CHECK_EQUAL(*it == b); ++it;
- BOOST_CHECK_EQUAL(*it == c); ++it;
- BOOST_CHECK_EQUAL(*it == d); ++it;
- BOOST_CHECK_EQUAL(*it == e); ++it;
- BOOST_CHECK_EQUAL(*it == f); ++it;
- BOOST_CHECK_EQUAL(*it == g); ++it;
- BOOST_CHECK_EQUAL(*it == h); ++it;
- BOOST_CHECK_EQUAL(it == boost::end(elems));
+ BOOST_CHECK_EQUAL(*it , a); ++it;
+ BOOST_CHECK_EQUAL(*it , b); ++it;
+ BOOST_CHECK_EQUAL(*it , c); ++it;
+ BOOST_CHECK_EQUAL(*it , d); ++it;
+ BOOST_CHECK_EQUAL(*it , e); ++it;
+ BOOST_CHECK_EQUAL(*it , f); ++it;
+ BOOST_CHECK_EQUAL(*it , g); ++it;
+ BOOST_CHECK_EQUAL(*it , h); ++it;
+ BOOST_CHECK_EQUAL(it , boost::end(elems));
     }else{
- BOOST_CHECK_EQUAL(*it == 0); ++it;
- BOOST_CHECK_EQUAL(*it == 1); ++it;
- BOOST_CHECK_EQUAL(*it == 2); ++it;
- BOOST_CHECK_EQUAL(*it == 3); ++it;
- BOOST_CHECK_EQUAL(*it == 4); ++it;
- BOOST_CHECK_EQUAL(*it == 5); ++it;
- BOOST_CHECK_EQUAL(*it == 7); ++it;
- BOOST_CHECK_EQUAL(*it == 9); ++it;
- BOOST_CHECK_EQUAL(it == boost::end(elems));
+ BOOST_CHECK_EQUAL(*it , 0); ++it;
+ BOOST_CHECK_EQUAL(*it , 1); ++it;
+ BOOST_CHECK_EQUAL(*it , 2); ++it;
+ BOOST_CHECK_EQUAL(*it , 3); ++it;
+ BOOST_CHECK_EQUAL(*it , 4); ++it;
+ BOOST_CHECK_EQUAL(*it , 5); ++it;
+ BOOST_CHECK_EQUAL(*it , 7); ++it;
+ BOOST_CHECK_EQUAL(*it , 9); ++it;
+ BOOST_CHECK_EQUAL(it , boost::end(elems));
     }
 }
 
@@ -95,12 +94,12 @@
         int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
         {
             int& max = *max_element( ref_list_of(a)(b)(c)(d)(e)(f)(g)(h) );
- BOOST_CHECK_EQUAL( max == f );
+ BOOST_CHECK_EQUAL( max , f );
             max = 8;
- BOOST_CHECK_EQUAL( f == 8 );
+ BOOST_CHECK_EQUAL( f , 8 );
             const int& const_max = *max_element(
                 cref_list_of(1)(5)(3)(d)(e)(f)(g)(h) );
- BOOST_CHECK_EQUAL( max == const_max );
+ BOOST_CHECK_EQUAL( max , const_max );
         }
     }
     // ---- Copy semantics
@@ -108,15 +107,15 @@
             int a=a1, d=d1, e=e1, f=f1, g=g1, h=h1;
         BOOST_AUTO(tmp,cref_list_of(1)(5)(3)(d)(e)(f)(g)(h));
         BOOST_AUTO(it,boost::begin(tmp));
- BOOST_CHECK_EQUAL(*it == a); it = boost::next(it,7);
- BOOST_CHECK_EQUAL(*it == h); ++it;
- BOOST_CHECK_EQUAL(it == boost::end(tmp));
- BOOST_CHECK_EQUAL( tmp.size() == 8 );
- BOOST_CHECK_EQUAL( tmp.empty() == false );
- BOOST_CHECK_EQUAL( tmp[0] == a );
- BOOST_CHECK_EQUAL( tmp[7] == h );
- BOOST_CHECK_EQUAL( tmp.front() == a );
- BOOST_CHECK_EQUAL( tmp.back() == h );
+ BOOST_CHECK_EQUAL(*it , a); it = boost::next(it,7);
+ BOOST_CHECK_EQUAL(*it , h); ++it;
+ BOOST_CHECK_EQUAL(it , boost::end(tmp));
+ BOOST_CHECK_EQUAL( tmp.size() , 8 );
+ BOOST_CHECK_EQUAL( tmp.empty() , false );
+ BOOST_CHECK_EQUAL( tmp[0] , a );
+ BOOST_CHECK_EQUAL( tmp[7] , h );
+ BOOST_CHECK_EQUAL( tmp.front() , a );
+ BOOST_CHECK_EQUAL( tmp.back() , h );
     }
         { // As left operand (iterators)
             int a, b, c,
@@ -131,15 +130,15 @@
             (d)(e)(f)
             (g)(h)(i));
         std::copy(boost::begin(tmp1),boost::end(tmp1),boost::begin(tmp2));
- BOOST_CHECK_EQUAL(a == a1);
- BOOST_CHECK_EQUAL(b == b1);
- BOOST_CHECK_EQUAL(c == c1);
- BOOST_CHECK_EQUAL(d == d1);
- BOOST_CHECK_EQUAL(e == e1);
- BOOST_CHECK_EQUAL(f == f1);
- BOOST_CHECK_EQUAL(g == g1);
- BOOST_CHECK_EQUAL(h == h1);
- BOOST_CHECK_EQUAL(i == i1);
+ BOOST_CHECK_EQUAL(a , a1);
+ BOOST_CHECK_EQUAL(b , b1);
+ BOOST_CHECK_EQUAL(c , c1);
+ BOOST_CHECK_EQUAL(d , d1);
+ BOOST_CHECK_EQUAL(e , e1);
+ BOOST_CHECK_EQUAL(f , f1);
+ BOOST_CHECK_EQUAL(g , g1);
+ BOOST_CHECK_EQUAL(h , h1);
+ BOOST_CHECK_EQUAL(i , i1);
     }
         { // As left operand (array)
             int a=a1, b=b1, c=c1,
@@ -149,16 +148,16 @@
         BOOST_AUTO(tmp2,ref_list_of(d)(e)(f));
         BOOST_AUTO(tmp3,ref_list_of(g)(h)(i));
         tmp1.swap(tmp2);
- BOOST_CHECK_EQUAL( a == d1 );
- BOOST_CHECK_EQUAL( b == e1 );
- BOOST_CHECK_EQUAL( c == f1 );
- BOOST_CHECK_EQUAL( d == a1 );
- BOOST_CHECK_EQUAL( e == b1 );
- BOOST_CHECK_EQUAL( f == c1 );
+ BOOST_CHECK_EQUAL( a , d1 );
+ BOOST_CHECK_EQUAL( b , e1 );
+ BOOST_CHECK_EQUAL( c , f1 );
+ BOOST_CHECK_EQUAL( d , a1 );
+ BOOST_CHECK_EQUAL( e , b1 );
+ BOOST_CHECK_EQUAL( f , c1 );
         tmp3.assign(0);
- BOOST_CHECK_EQUAL( g == 0 );
- BOOST_CHECK_EQUAL( h == 0 );
- BOOST_CHECK_EQUAL( i == 0 );
+ BOOST_CHECK_EQUAL( g , 0 );
+ BOOST_CHECK_EQUAL( h , 0 );
+ BOOST_CHECK_EQUAL( i , 0 );
     }
     // ---- Rebind semantics
         { // As left operand
@@ -169,32 +168,32 @@
         BOOST_AUTO(tmp2,ref_rebind_list_of(d)(e)(f));
         BOOST_AUTO(tmp3,cref_rebind_list_of(g)(h)(i));
                 tmp1.swap(tmp2);
- BOOST_CHECK_EQUAL( tmp1[0] == d );
- BOOST_CHECK_EQUAL( tmp1[1] == e );
- BOOST_CHECK_EQUAL( tmp1[2] == f );
- BOOST_CHECK_EQUAL( tmp2[0] == a );
- BOOST_CHECK_EQUAL( tmp2[1] == b );
- BOOST_CHECK_EQUAL( tmp2[2] == c );
- BOOST_CHECK_EQUAL( a == a1 );
- BOOST_CHECK_EQUAL( b == b1 );
- BOOST_CHECK_EQUAL( c == c1 );
- BOOST_CHECK_EQUAL( d == d1 );
- BOOST_CHECK_EQUAL( e == e1 );
- BOOST_CHECK_EQUAL( f == f1 );
+ BOOST_CHECK_EQUAL( tmp1[0] , d );
+ BOOST_CHECK_EQUAL( tmp1[1] , e );
+ BOOST_CHECK_EQUAL( tmp1[2] , f );
+ BOOST_CHECK_EQUAL( tmp2[0] , a );
+ BOOST_CHECK_EQUAL( tmp2[1] , b );
+ BOOST_CHECK_EQUAL( tmp2[2] , c );
+ BOOST_CHECK_EQUAL( a , a1 );
+ BOOST_CHECK_EQUAL( b , b1 );
+ BOOST_CHECK_EQUAL( c , c1 );
+ BOOST_CHECK_EQUAL( d , d1 );
+ BOOST_CHECK_EQUAL( e , e1 );
+ BOOST_CHECK_EQUAL( f , f1 );
         tmp3.assign(d);
- BOOST_CHECK_EQUAL( tmp3[0] == d );
- BOOST_CHECK_EQUAL( tmp3[0] == d );
- BOOST_CHECK_EQUAL( tmp3[0] == d );
- BOOST_CHECK_EQUAL( g == g1 );
- BOOST_CHECK_EQUAL( h == h1 );
- BOOST_CHECK_EQUAL( i == i1 );
+ BOOST_CHECK_EQUAL( tmp3[0] , d );
+ BOOST_CHECK_EQUAL( tmp3[0] , d );
+ BOOST_CHECK_EQUAL( tmp3[0] , d );
+ BOOST_CHECK_EQUAL( g , g1 );
+ BOOST_CHECK_EQUAL( h , h1 );
+ BOOST_CHECK_EQUAL( i , i1 );
     }
     // ---- Concatenate ranges
     {
         boost::array<int,4> array; array.assign(-1);
             int a=a1, b=b1, c=c1;
 
- BOOST_CHECK_EQUAL(boost::size(cref_list_of(a)(b)(c).range(array))==7u);
+ BOOST_CHECK_EQUAL(boost::size(cref_list_of(a)(b)(c).range(array)),7u);
         // TODO:
         //BOOST_CHECK_EQUAL(
         // boost::size(
@@ -202,7 +201,7 @@
         // cref_list_of(a)(b)(c),
         // array
         // )
- // )== 7u
+ // ), 7u
         //);
     }
     // ---- Range conversion
@@ -230,29 +229,29 @@
             std::stack<int> elems;
             int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
             elems = cref_list_of(a)(b)(c)(d)(e)(f)(g)(h).to_adapter();
- BOOST_CHECK_EQUAL(elems.top() == h); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == g); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == f); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == e); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == d); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == c); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == b); elems.pop();
- BOOST_CHECK_EQUAL(elems.top() == a); elems.pop();
- BOOST_CHECK_EQUAL(elems.empty() == true);
+ BOOST_CHECK_EQUAL(elems.top() , h); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , g); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , f); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , e); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , d); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , c); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , b); elems.pop();
+ BOOST_CHECK_EQUAL(elems.top() , a); elems.pop();
+ BOOST_CHECK_EQUAL(elems.empty() , true);
         }
         {
             std::queue<int> elems;
             int a=a1, b=b1, c=c1, d=d1, e=e1, f=f1, g=g1, h=h1;
             elems = cref_list_of(a)(b)(c)(d)(e)(f)(g)(h).to_adapter();
- BOOST_CHECK_EQUAL(elems.front() == a); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == b); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == c); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == d); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == e); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == f); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == g); elems.pop();
- BOOST_CHECK_EQUAL(elems.front() == h); elems.pop();
- BOOST_CHECK_EQUAL(elems.empty() == true);
+ BOOST_CHECK_EQUAL(elems.front() , a); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , b); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , c); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , d); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , e); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , f); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , g); elems.pop();
+ BOOST_CHECK_EQUAL(elems.front() , h); elems.pop();
+ BOOST_CHECK_EQUAL(elems.empty() , true);
         }
     }
 }


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