Function and template overloading with subtypes.