Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61066 - trunk/boost/range/adaptor
From: neil_at_[hidden]
Date: 2010-04-05 05:54:35


Author: neilgroves
Date: 2010-04-05 05:54:34 EDT (Mon, 05 Apr 2010)
New Revision: 61066
URL: http://svn.boost.org/trac/boost/changeset/61066

Log:
Boost.Range fix to the skip_iterator constructor used by adjacent_filter. On the templatised constructor the m_range variable was uninitialized. This may explain some of the failures for adjacent_filtered and uniqued on Intel compilers.
Text files modified:
   trunk/boost/range/adaptor/adjacent_filtered.hpp | 12 ++++++------
   1 files changed, 6 insertions(+), 6 deletions(-)

Modified: trunk/boost/range/adaptor/adjacent_filtered.hpp
==============================================================================
--- trunk/boost/range/adaptor/adjacent_filtered.hpp (original)
+++ trunk/boost/range/adaptor/adjacent_filtered.hpp 2010-04-05 05:54:34 EDT (Mon, 05 Apr 2010)
@@ -38,7 +38,7 @@
                         typedef boost::iterator_adaptor< skip_iterator<Iter,R>, Iter >
                                   base_t;
 
- R* range;
+ R* m_range;
 
                 public:
                         typedef Iter wrapped_iter_t;
@@ -52,21 +52,21 @@
                         typedef std::input_iterator_tag iterator_category;
 
                         explicit skip_iterator( R* r, Iter i )
- : base_t(i), range(r) {}
+ : base_t(i), m_range(r) {}
 
                         template< class OtherIter, class R2>
                         skip_iterator( const skip_iterator<OtherIter,R2>& other )
- : base_t( other.base() ) {}
+ : base_t( other.base() ), m_range(other.m_range) {}
 
- R* get_range() const { return range; }
+ R* get_range() const { return m_range; }
 
                  private:
                         friend class boost::iterator_core_access;
 
                         void increment()
                         {
- BOOST_ASSERT( range != 0 );
- range->increment_impl( this->base_reference() );
+ BOOST_ASSERT( m_range != 0 );
+ m_range->increment_impl( this->base_reference() );
                         }
 
                         //


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