Inheritance from templated class