|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-02 16:15:50
The documentation is correct. If you store internal state in the Base object
you have no problem. If you store it in the Policies object, and two
iterators which have different internal state can be legally compared,
you've got trouble. I'm not sure this is the best design, as you point out,
but it's what we've got.
===================================================
David Abrahams, C++ library designer for hire
resume: http://users.rcn.com/abrahams/resume.html
C++ Booster (http://www.boost.org)
email: david.abrahams_at_[hidden]
===================================================
----- Original Message -----
From: <nbecker_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, October 02, 2001 3:10 PM
Subject: [boost] iterator_adaptor question
> In the HTML doc for iterator_adaptor, we see
>
> template <class Difference, class BaseType1, class BaseType2>
> Difference distance(type<Difference>, const BaseType1& x, const
> BaseType2& y) const {}
>
> As I understand it, the "BaseType1/2" is misleading, because the
> parameter is not the base iterator, it's the adapted iterator. Do I
> understand correctly? I hope so, because it would be impossible to
> make this work for adaptors that have internal state otherwise.
>
>
> Info: http://www.boost.org Unsubscribe:
<mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk