What inherent advantages do boost::any and boost::any_cast offer over using void* and dynamic_cast?
boost::any
boost::any_cast
void*
dynamic_cast
boost::any calls destructors:
{ boost::any x = std::string("Hello, world"); x = std::wstring(L"Goodbye"); // string::~string called here } // wstring::~wstring called here