This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: auto_ptr bug
branko.cibej@hermes.si wrote:
>
> Brad Garcia wrote:
> > So, getting to my real problem: how can I make a map full of Foo's, and
> > have them get destroyed when the map is destroyed, given that the Foo's
> > themselves cannot be copied?
>
> I think your best bet is to use a reference-counted pointer.
> There are several implementations floating around; see, for
> instance, http://www.boost.org/ .
Or look in Stroustrup3e under "handle" for a quick-and-dirty
implementation.
--
Marc A. Lepage
Software Developer
Molecular Mining Corporation
http://www.molecularmining.com/