
16 Apr
2011
16 Apr
'11
11:43 p.m.
Hi Dave, Thanks for your email.
Not unless yours is a random access iterator. Is it?
Its a forward iterator. Changing it to a random access iterator solves it indeed. This is my first iterator that I am writing, but why is it not possible to implement a custom distance method for forward iterators? Am I doing something conceptually wrong? Or should I specialize the std::distance() function? Thank you, Andrej