I am using boost::any to have polymorphic types, I need to be able to cast an object to its base type.