Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-01-02 23:21:52

"Daryle Walker" <darylew_at_[hidden]> wrote in message
> On 1/1/04 9:58 PM, "Thorsten Ottosen" <nesotto_at_[hidden]> wrote:


> > There is no requierement about the objects being polymorphic.
> I know that, but I don't think that the non-polymorphic cases are useful.
> If all the elements are the same type, you can use a standard container.

there's still some benefits of using a pointer container.

> If
> the elements are of differing un-related types, then you are restricted in
> what you can do (like no deletion) unless you give element-pointers the
> properties of full-blown smart pointers, which is probably overkill for
> applications.
> Are there common cases where you would need non-polymorphic capability?

The thing that got me started was a voice commuincation app that had a
map<string, Socket*> member. I assume that the programmer had reason
for using the pointers; perhaps the socket was not assigneable.



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