Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2003-12-28 22:09:06

Sounds very interesting to me, the couple of times I've tried using
auto_ptr's as container elements I ran into so much trouble I just gave up
and used plain pointers.

It could only be complete with "ptr_hash_map<>" though (my favorite
container :)

What happens if I inadvertently pass pointers to statically allocated
objects, like const strings, to push_back(), or other input functions?
Would it be safer for push_back(), say, to take a smart pointer as input?
What if I *want* to use pointers to const strings, i.e.: *not* to be owned
by the pointer container, but still enjoy its other conveniences?
And, should there be corresponding array_map<>, array_set<>, etc.?; --i.e.:
owning containers for elements requiring delete[] as opposed to delete?


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