Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-02-27 15:09:12


----- Original Message -----
From: <nbecker_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 27, 2002 2:54 PM
Subject: [boost] iterator adaptor API

> I think iterator adaptor documentation can be improved. One subject
> that I think is not well covered is the semantics of the different
> members.

I presume you mean members of the Policies class.

> For example, what is the intended usage of "distance"? What should it
> mean? Where is it expected to be used?

> One possible interpretation is that the distance between two adapted
> iterators is the size of container needed to copy from the adapted
> iterators.

I'm baffled. How much clearer could this be?

www.boost.org/libs/utility/iterator_adaptors.htm#policies

Effects: "measures the distance between iterators". The "distance between
iterators" is a well-understood concept, isn't it?

> This is meant just as an example of where the semantics are unclear to
> me. I think that clearly spelling out the intended meaning an usage
> could help to make iterators interoperable.

Feel free to post a doc patch; if it looks like an improvement to Jeremy and
I, we'll incorporate it.


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