/// parameter-declaration
///
/// type-parameter: (see below)
-/// 'class' ...[opt] identifier[opt]
+/// 'class' ...[opt][C++0x] identifier[opt]
/// 'class' identifier[opt] '=' type-id
-/// 'typename' ...[opt] identifier[opt]
+/// 'typename' ...[opt][C++0x] identifier[opt]
/// 'typename' identifier[opt] '=' type-id
-/// 'template' ...[opt] '<' template-parameter-list '>' 'class' identifier[opt]
+/// 'template' ...[opt][C++0x] '<' template-parameter-list '>' 'class' identifier[opt]
/// 'template' '<' template-parameter-list '>' 'class' identifier[opt] = id-expression
Parser::DeclPtrTy
Parser::ParseTemplateParameter(unsigned Depth, unsigned Position) {
/// ParseTemplateTemplateParameter and ParseNonTypeTemplateParameter.
///
/// type-parameter: [C++ temp.param]
-/// 'class' ...[opt] identifier[opt]
+/// 'class' ...[opt][C++0x] identifier[opt]
/// 'class' identifier[opt] '=' type-id
-/// 'typename' ...[opt] identifier[opt]
+/// 'typename' ...[opt][C++0x] identifier[opt]
/// 'typename' identifier[opt] '=' type-id
Parser::DeclPtrTy Parser::ParseTypeParameter(unsigned Depth, unsigned Position){
assert((Tok.is(tok::kw_class) || Tok.is(tok::kw_typename)) &&
// Grab the ellipsis (if given).
bool Ellipsis = false;
SourceLocation EllipsisLoc;
- if (getLang().CPlusPlus0x && Tok.is(tok::ellipsis)) {
+ if (Tok.is(tok::ellipsis)) {
Ellipsis = true;
EllipsisLoc = ConsumeToken();
+
+ if (!getLang().CPlusPlus0x)
+ Diag(EllipsisLoc, diag::err_variadic_templates);
}
// Grab the template parameter name (if given)