From 3a6c6c6bcdcd0a6951cd594288a12d21e42668e7 Mon Sep 17 00:00:00 2001 From: Neil Groves Date: Mon, 5 Apr 2010 09:54:34 +0000 Subject: [PATCH] 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. [SVN r61066] --- include/boost/range/adaptor/adjacent_filtered.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/range/adaptor/adjacent_filtered.hpp b/include/boost/range/adaptor/adjacent_filtered.hpp index 4f0bb75..4a7a809 100644 --- a/include/boost/range/adaptor/adjacent_filtered.hpp +++ b/include/boost/range/adaptor/adjacent_filtered.hpp @@ -38,7 +38,7 @@ namespace boost typedef boost::iterator_adaptor< skip_iterator, Iter > base_t; - R* range; + R* m_range; public: typedef Iter wrapped_iter_t; @@ -52,21 +52,21 @@ namespace boost 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& 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() ); } //