Topic: auto_ptr semantic for standard containers


Author: Frank Uepping <Frank.Uepping@epost.de>
Date: Mon, 19 Feb 2001 01:15:35 GMT
Raw View
Hello,
auto_ptrs are nice, they provide easy "resource acquisition is
initialization"
technique and ownership semantic for objects referenced by pointers.
But auto_ptrs doesn't work with the standard container family
e.g.:"vector<auto_ptr<X> >".
It were nice if there would be a standard container variant that
implements an
ownership semantic for its objects referenced by pointers like auto_ptr.

Frank U.


---
[ 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    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]