$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] iterator_facade and distance()
From: Andrej van der Zee (andrejvanderzee_at_[hidden])
Date: 2011-04-16 19:43:00
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