forked from boostorg/range
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]
This commit is contained in:
@ -38,7 +38,7 @@ namespace boost
|
|||||||
typedef boost::iterator_adaptor< skip_iterator<Iter,R>, Iter >
|
typedef boost::iterator_adaptor< skip_iterator<Iter,R>, Iter >
|
||||||
base_t;
|
base_t;
|
||||||
|
|
||||||
R* range;
|
R* m_range;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef Iter wrapped_iter_t;
|
typedef Iter wrapped_iter_t;
|
||||||
@ -52,21 +52,21 @@ namespace boost
|
|||||||
typedef std::input_iterator_tag iterator_category;
|
typedef std::input_iterator_tag iterator_category;
|
||||||
|
|
||||||
explicit skip_iterator( R* r, Iter i )
|
explicit skip_iterator( R* r, Iter i )
|
||||||
: base_t(i), range(r) {}
|
: base_t(i), m_range(r) {}
|
||||||
|
|
||||||
template< class OtherIter, class R2>
|
template< class OtherIter, class R2>
|
||||||
skip_iterator( const skip_iterator<OtherIter,R2>& other )
|
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:
|
private:
|
||||||
friend class boost::iterator_core_access;
|
friend class boost::iterator_core_access;
|
||||||
|
|
||||||
void increment()
|
void increment()
|
||||||
{
|
{
|
||||||
BOOST_ASSERT( range != 0 );
|
BOOST_ASSERT( m_range != 0 );
|
||||||
range->increment_impl( this->base_reference() );
|
m_range->increment_impl( this->base_reference() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user