Topic: auto_ptr::operator==
Author: Valentin Bonnard <bonnardv@pratique.fr>
Date: 1997/08/26 Raw View
[ Only posted on comp.std.c++ ]
Frank Bailleul <"<REMOVE THIS>bailleuf"@btmaa.bel.alcatel.be> writes:
> Just curious (maybe it is already explained somewhere):
>
> Why doesn't std::auto_ptr have an operator==() ?
As it doesn't have a conversion to T*, in order to look like
a normal pointer it could have operator==; but the intended
use of auto_ptr is to hold an object (have the responsabillity
of deleting it), and normally auto_ptr never compare equal.
But for some ref_counted_ptr it is very resonnable to have
operator==.
--
Valentin Bonnard
mailto:bonnardv@pratique.fr
http://www.pratique.fr/~bonnardv (Informations sur le C++ en Francais)
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]