Boost logo

Boost Users :

From: Sam Partington (sam.partington_at_[hidden])
Date: 2004-01-15 07:17:15


Hi all,

Is there any reason why boost::scoped_ptr::reset doesn't provide a
std::auto_ptr overload?

Take the following code :

class A {};
std::auto_ptr<A> factory();

// ...

boost::scoped_ptr<A> a;

a.reset(factory().release());

wheras

a.reset(factory());

would be neater.

(Trivial difference I know, but it does add to readability)

Sam

--LongSig
******************
This e-mail has been sent from Imagination Technologies Limited.
PowerVR, Metagence, Ensigma and PURE Digital are divisions
of Imagination Technologies Limited.

The information contained in this e-mail, including any attachment,
is confidential and may be legally privileged. It is intended solely
for the addressee(s) and access to this e-mail by anyone else is
unauthorised. If you are not the intended recipient, any disclosure,
copying or distribution or use of the information contained in this
e-mail, is prohibited and may be unlawful. If you have received this
e-mail in error, please notify the sender by return e-mail and then
delete it from your system.

Internet communications cannot be guaranteed to be secure,
error or virus-free. The sender does not accept liability for any errors
or omissions which arise as a result.

Any views expressed in this message are those of the author, except
where the author specifies and, with authority, states them to be the
views of Imagination Technologies Ltd.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net