
16 Apr
2011
16 Apr
'11
12:55 a.m.
Hi,
I am trying to implement an iterator using boost::iterator_facade. It
works fine but it is very slow, I think because the distance()
function takes lineair time as it is seems to be implemented in terms
of increment(). I would like to implement the distance() function
myself but I am not sure how. I tried to implement distance_to() like
this:
class const_data_stream_iterator :
public boost::iterator_facade