value type for boost::any_cast can't be a reference