Boost logo

Boost-Commit :

From: igaztanaga_at_[hidden]
Date: 2007-11-19 11:55:24


Author: igaztanaga
Date: 2007-11-19 11:55:23 EST (Mon, 19 Nov 2007)
New Revision: 41234
URL: http://svn.boost.org/trac/boost/changeset/41234

Log:
Fixed errors detected by gcc-4.3
Text files modified:
   trunk/boost/interprocess/containers/vector.hpp | 12 ++++++------
   trunk/boost/interprocess/detail/iterators.hpp | 32 ++++++++++++++++----------------
   2 files changed, 22 insertions(+), 22 deletions(-)

Modified: trunk/boost/interprocess/containers/vector.hpp
==============================================================================
--- trunk/boost/interprocess/containers/vector.hpp (original)
+++ trunk/boost/interprocess/containers/vector.hpp 2007-11-19 11:55:23 EST (Mon, 19 Nov 2007)
@@ -408,8 +408,8 @@
    typedef typename base_t::alloc_version alloc_version;
 
    typedef constant_iterator<T, difference_type> cvalue_iterator;
- typedef repeat_iterator<T, difference_type> repeat_iterator;
- typedef detail::move_iterator<repeat_iterator> repeat_move_it;
+ typedef repeat_iterator<T, difference_type> rp_iterator;
+ typedef detail::move_iterator<rp_iterator> repeat_move_it;
    //This is the anti-exception array destructor
    //to deallocate values already constructed
    typedef typename detail::if_c
@@ -961,8 +961,8 @@
       //Just call more general insert(pos, size, value) and return iterator
       size_type n = position - begin();
       this->insert(position
- ,repeat_move_it(repeat_iterator(mx.get(), 1))
- ,repeat_move_it(repeat_iterator()));
+ ,repeat_move_it(rp_iterator(mx.get(), 1))
+ ,repeat_move_it(rp_iterator()));
       return iterator(this->members_.m_start + n);
    }
    #else
@@ -971,8 +971,8 @@
       //Just call more general insert(pos, size, value) and return iterator
       size_type n = position - begin();
       this->insert(position
- ,repeat_move_it(repeat_iterator(mx, 1))
- ,repeat_move_it(repeat_iterator()));
+ ,repeat_move_it(rp_iterator(mx, 1))
+ ,repeat_move_it(rp_iterator()));
       return iterator(this->members_.m_start + n);
    }
    #endif

Modified: trunk/boost/interprocess/detail/iterators.hpp
==============================================================================
--- trunk/boost/interprocess/detail/iterators.hpp (original)
+++ trunk/boost/interprocess/detail/iterators.hpp 2007-11-19 11:55:23 EST (Mon, 19 Nov 2007)
@@ -232,7 +232,7 @@
   : public std::iterator
       <std::random_access_iterator_tag, T, Difference>
 {
- typedef repeat_iterator this_type;
+ typedef repeat_iterator<T, Difference> this_type;
    public:
    explicit repeat_iterator(T &ref, Difference range_size)
       : m_ptr(&ref), m_num(range_size){}
@@ -244,52 +244,52 @@
    repeat_iterator& operator++()
    { increment(); return *this; }
    
- repeat_iterator operator++(int)
+ this_type operator++(int)
    {
- repeat_iterator result (*this);
+ this_type result (*this);
       increment();
       return result;
    }
 
- friend bool operator== (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator== (const this_type& i, const this_type& i2)
    { return i.equal(i2); }
 
- friend bool operator!= (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator!= (const this_type& i, const this_type& i2)
    { return !(i == i2); }
 
- friend bool operator< (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator< (const this_type& i, const this_type& i2)
    { return i.less(i2); }
 
- friend bool operator> (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator> (const this_type& i, const this_type& i2)
    { return i2 < i; }
 
- friend bool operator<= (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator<= (const this_type& i, const this_type& i2)
    { return !(i > i2); }
 
- friend bool operator>= (const repeat_iterator& i, const repeat_iterator& i2)
+ friend bool operator>= (const this_type& i, const this_type& i2)
    { return !(i < i2); }
 
- friend Difference operator- (const repeat_iterator& i, const repeat_iterator& i2)
+ friend Difference operator- (const this_type& i, const this_type& i2)
    { return i2.distance_to(i); }
 
    //Arithmetic
- repeat_iterator& operator+=(Difference off)
+ this_type& operator+=(Difference off)
    { this->advance(off); return *this; }
 
- repeat_iterator operator+(Difference off) const
+ this_type operator+(Difference off) const
    {
- repeat_iterator other(*this);
+ this_type other(*this);
       other.advance(off);
       return other;
    }
 
- friend repeat_iterator operator+(Difference off, const repeat_iterator& right)
+ friend this_type operator+(Difference off, const this_type& right)
    { return right + off; }
 
- repeat_iterator& operator-=(Difference off)
+ this_type& operator-=(Difference off)
    { this->advance(-off); return *this; }
 
- repeat_iterator operator-(Difference off) const
+ this_type operator-(Difference off) const
    { return *this + (-off); }
 
    T& operator*() const


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