Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-18 21:08:45

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
> From: "Darin Adler" <darin_at_[hidden]>
> > Things in there that I am not sure we want:
> >
> > i) removal of "self assignment" feature of reset member -- it's a
> > strange feature, but I'm not sure we should remove it
> I don't see 'self assignment' as a feature, but if it's deemed essential,
> would be trivial to add.
> Note, however, that in the case where shared_ptr accepts a finalizer,
> reset() is not a no-op in the self-assignment case, since it reverts to
> default 'delete px' finalizer.

IMO it's not even a question of self-assignment. I would prefer to detect
calls to "reset" on a pointer that is already managed by another smart
pointer whenever possible, by asserting.

  David Abrahams, C++ library designer for hire

        C++ Booster (
          email: david.abrahams_at_[hidden]

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