Boost logo

Boost :

From: Jon Kalb (jonkalb_at_[hidden])
Date: 2001-08-17 12:37:57

> -----Original Message-----
> From: Peter Dimov [mailto:pdimov_at_[hidden]]
> Sent: Friday, August 17, 2001 10:32 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] smart ptr changes
> From: "George A. Heintzelman" <georgeh_at_[hidden]>
> > Why get rid of the std::swap specialization? Although it is
> > unnecessary for good exception safety, it is going to be
> faster than
> > the default version, since you avoid several increments and
> decrements
> > of the reference counts (admittedly a compiler can optimize those
> > away, but why force it to?). Since it is already written and works,
> > you may as well leave it. There aren't any issues with specializing
> > this in std::, are there? shared_ptr<x> is a UDT, so it should be
> > legal...
> A specialization would be legal. However std::swap is a
> function template and the language does not support partial
> function template specializations.

As a boost library it isn't legal, but it could be left in for the
proposal to the LWG. Surely they aren't bound by this.

Boost list run by bdawes at, gregod at, cpdaniel at, john at