multiple inheritance in templates