Boost logo

Boost :

From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2006-11-21 18:43:17


Hi,

A few days ago, I made a comment about std::distance() and
std::advance() being reimplemented for the new style iterator concepts.
Dave said that patches are welcome.

So I sat down and wrote some preliminary versions of the two functions.
They are in the attached file.
The file parses cleanly, but I have not tried instantiating any of the
templates yet.

I have a question, though. Does it make sense to implement
boost::distance for single pass iterators? Is there anything useful that
could be done with the resulting information?

Aside from that, I'd be happy to receive any suggestions for code
improvement, adherence to Boost standards, and so on.

Sebastian Redl




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk