Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2002-07-29 03:33:49


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dave,

On Monday 29 July 2002 01:59, David Abrahams wrote:
> From: "Thomas Witt" <witt_at_[hidden]>
> It's really hard to carry on this discussion without a definition of your
> Adapter/LeanIterator concepts.

I will try to provide some code/text later.

>
> I'm not claiming that it's the right solution. However, at least read-only
> access to the state is often useful, and I wouldn't want to prohibit it.
>

Agreed.

> It's hard to say without seeing more details. There are lots of viable
> approaches, though. Have you thought about using a GenVoca arrangement?

No, I haven't got around to learn about GenVoca yet. Is there a paper
available somewhere?

> > Ok maybe I was exaggerating a bit, but with the current design it is
> > impossible to implement a cycle or joining iterator that has natural
> > const/non-const interaction.
>
> Because you end up using a different type for the policies class in the
> const version?

Yes, the basic problem is that you have to store iterators in the policies
object so that they can be returned to the user later(wrapping around, moving
to the next sequence). Either you use different policies types or you store
non-const iterators even for the const iterator. The first option results in
incompatible iterators, the second in a const iterator that can not be
generated from a const container.

- --Thomas

- --
Dipl.-Ing. Thomas Witt
Institut fuer Verkehrswesen, Eisenbahnbau und -betrieb, Universitaet Hannover
voice: +49(0) 511 762 - 4273, fax: +49(0) 511 762-3001
http://www.ive.uni-hannover.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9RP310ds/gS3XsBoRAq1jAJsERSH1loEubTqIK0WXsd6sWW5YsgCaA9AB
rWDpLxRzkGyAL6TKYYgt+1Q=
=lZ/q
-----END PGP SIGNATURE-----


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