allow typename keyword in lieu of class, in template declarations

This commit is contained in:
David Rose 2011-11-04 16:58:39 +00:00
parent 594f1e32d7
commit 633e697d54

View File

@ -1135,6 +1135,14 @@ template_formal_parameter:
| KW_CLASS name '=' full_type
{
$$ = CPPType::new_type(new CPPClassTemplateParameter($2, $4));
}
| KW_TYPENAME name
{
$$ = CPPType::new_type(new CPPClassTemplateParameter($2));
}
| KW_TYPENAME name '=' full_type
{
$$ = CPPType::new_type(new CPPClassTemplateParameter($2, $4));
}
| template_formal_parameter_type formal_parameter_identifier template_parameter_maybe_initialize
{
@ -1165,10 +1173,6 @@ template_formal_parameter_type:
{
$$ = $1->find_type(current_scope, global_scope, false, current_lexer);
assert($$ != NULL);
}
| KW_TYPENAME name
{
$$ = CPPType::new_type(new CPPTBDType($2));
}
;