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
then
> > erasing the type is probably not the way to go, and as has been pointed
out
> > in this thread, void * is type erasure. More or less the only safe thing
you
> > 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.

Regards,

Terje


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk