From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-08-31 03:45:26
In message <NCBBKJKIKJNLJBMJJNLFGEMIDBAA.bill.wade_at_[hidden]>, Bill
Wade <bill.wade_at_[hidden]> writes
>The html docs look real neat.
>Unfortunately my reader choked on the .pdf.
Hmm, dunno what's up there. It's the one gen'd by SIGS. Unfortunately I
don't have Distiller, but if it's of any use I have now put the
original, submitted MS Word doc file up there as an alternative.
>It should be possible to create a similar class, any_struct, that holds
>anything that can be a base class (copyconstructable structs) and supports
>hierarchy conversions. In other words foo* any_struct::to_ptr<foo>() would
>use a dynamic cast rather than a typeid comparison. Have you (or anyone you
>know of) put together such a class?
It's not a problem that I've tried to solve in anger. I've had a look at
it in the past briefly and found (1) that runtime polymorphism and
templates tend to cause a conflict, ie requires either virtual member
templates or extra requirements on the contained type, and (2) most of
the cases where I might need it a cloning_ptr normally does the trick.
Thinking about it, does this relate to Peter's ref<T>? IIRC, it needed
its own RTTI mechanism to work.
Kevlin Henney phone: +44 117 942 2990
Curbralan Ltd mobile: +44 7801 073 508
kevlin_at_[hidden] fax: +44 870 052 2289
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk