Template inheritance implementation