Add polymorphic_pointer_cast