6 Sep
2010
6 Sep
'10
4:10 p.m.
On 06/09/10 16:49, Tang Jiang Jun wrote:
I agree with you that void* just support polymorphism for single inheritance. However I think maybe it is possible to make boost::any to support full polymorphic behavior, because, for boost::any, there still has accurate type information when casting happens. With some tricks, maybe we can use dynamic_cast to help boost::any to cast the internal pointer to correct child class object.
I'd be surprised there is such a trick to do that.