|
Boost : |
From: Douglas Gregor (gregod_at_[hidden])
Date: 2002-01-27 09:56:54
I've applied the following trivial patch to boost/half_open_range.hpp.
counting_iterator_traits doesn't have the iterator typedefs (value_type,
reference, pointer, etc.), so we take it from the counting iterator directly.
Doug
Index: half_open_range.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/half_open_range.hpp,v
retrieving revision 1.3
diff -c -3 -p -r1.3 half_open_range.hpp
*** half_open_range.hpp 2001/02/11 19:36:43 1.3
--- half_open_range.hpp 2002/01/27 14:53:20
*************** struct half_open_range
*** 99,115 ****
public:
typedef iter_t const_iterator;
! typedef typename counting_iterator_traits<Incrementable>::value_type
value_type;
! typedef typename
counting_iterator_traits<Incrementable>::difference_type difference_type;
! typedef typename counting_iterator_traits<Incrementable>::reference
reference;
! typedef typename counting_iterator_traits<Incrementable>::reference
const_reference;
! typedef typename counting_iterator_traits<Incrementable>::pointer
pointer;
! typedef typename counting_iterator_traits<Incrementable>::pointer
const_pointer;
// It would be nice to select an unsigned type, but this is appropriate
// since the library makes an attempt to select a difference_type which
can
// hold the difference between any two iterators.
! typedef typename
counting_iterator_traits<Incrementable>::difference_type size_type;
half_open_range(Incrementable start, Incrementable finish)
: m_start(start),
--- 99,115 ----
public:
typedef iter_t const_iterator;
! typedef typename iterator::value_type value_type;
! typedef typename iterator::difference_type difference_type;
! typedef typename iterator::reference reference;
! typedef typename iterator::reference const_reference;
! typedef typename iterator::pointer pointer;
! typedef typename iterator::pointer const_pointer;
// It would be nice to select an unsigned type, but this is appropriate
// since the library makes an attempt to select a difference_type which
can
// hold the difference between any two iterators.
! typedef typename iterator::difference_type size_type;
half_open_range(Incrementable start, Incrementable finish)
: m_start(start),
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk