Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2003-08-06 14:06:42


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

Rozental, Gennadiy wrote:

|>-----BEGIN PGP SIGNED MESSAGE-----
|>Hash: SHA1
|>
|>Rozental, Gennadiy wrote:
|>
|>| What is the problem adapting pair of iterators to scalar vectors to
|>produce
|>| an iterator with complex value type?
|>
|>The problem is you can hardly adapt a pair. So using
|>iterator_adaptor (the new class template) does not provide
|>any benefit.
|
|
| Why is that?

The whole point in adapting is that you modify some but not all
behaviour/interface of a thing. Ther is nothing a pair provides that can
be reused so adaption is pointless.

That's why the new version provides iterator_facade and
iterator_adaptor. iterator_facade helps with implementing iterators,
iterator_adaptor is for adapting iterator like types.

| I did not look in depth on new version but I remember that old
| one allowed to adapt any source.

You needed to do this as the iterator interface implementation was not
seperated from the actual iterator_adaption.

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.2.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/MVHC0ds/gS3XsBoRAsJLAJ4gb8KM3GJGi3wYM65ppMSfasuXtACghiD3
dGgVfgSioFYgEm0ihB0r9zY=
=wm0V
-----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