Boost logo

Boost :

From: Thomas Witt (witt_at_[hidden])
Date: 2002-10-04 11:01:59


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

Oliver,

On Friday 04 October 2002 16:58, Schoenborn, Oliver wrote:
>
> A smart pointer IS-NOT-A pointer either.

No it is a drop in replacement. And as such it has to model pointer behaviour.

> So although all of the above is
> true, from a *usage* point of view there is no difference to the programmer
> (though of course to the compiler writer the difference differences are
> critical): a const smart_ptr for T should be usable wherever one for const
> T can be used.

No, definetly not. There is a difference for builtin pointers between a const
pointer and a pointer to const objects and so should be for any smart
pointer.

If it does not behave like a pointer it should not be named pointer.

- --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

iD8DBQE9nbt70ds/gS3XsBoRAtnmAJ4qv8fWzrvFXD04rBkKfCjgUV00PACdGJfX
Ebsa2AgVxlpw9cLiSEP4b1Q=
=UnZQ
-----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