any_cast on polymoprhic types?
14 Aug
2007
14 Aug
'07
6:34 p.m.
Is there a way to use any_cast for polymorphic types? For instance,
let's say I've got a Base class and a Derived class. I want to be able
to any_cast a Derived * to a Base * successfully, like so:
class Base { virtual ~Base() {} };
class Derived : public Base { virtual ~Derived() {} };
Derived d;
boost::any a = &d;
boost::any_cast
6316
Age (days ago)
6316
Last active (days ago)
0 comments
1 participants
participants (1)
-
Gross, Steve