Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2002-12-11 12:01:42

>From: "David Abrahams" <dave_at_[hidden]>

> Terje Slettebø <tslettebo_at_[hidden]> writes:
> > I understand you (Johan) want to be able to have generic factories, but
> > erasing the type is probably not the way to go, and as has been pointed
> > in this thread, void * is type erasure. More or less the only safe thing
> > can do with it, is to delete it.
> Not even that, usually.

Of course, it depends on whether the type supports polymorphic deletion, and
whether or not it's an array (so you would need delete[]), but are there
other issues besides this? I assumed that if types were used in this way,
then at least the above was known.



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