[cfe-commits] r68081 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Basic/TemplateKinds.h include/clang/Parse/Action.h lib/AST/ASTContext.cpp lib/AST/Type.cpp lib/Parse/MinimalAction.cpp lib/Parse/ParseDecl.cpp lib/Pars

Douglas Gregor dgregor at apple.com
Mon Mar 30 20:39:08 PDT 2009


On Mar 30, 2009, at 5:47 PM, Eli Friedman wrote:

> On Mon, Mar 30, 2009 at 5:43 PM, Douglas Gregor <dgregor at apple.com>  
> wrote:
>> +    // Note: C++03 was more strict here, because it banned the use  
>> of
>> +    // the "template" keyword prior to a template-name that was  
>> not a
>> +    // dependent name. C++ DR468 relaxed this requirement (the
>> +    // "template" keyword is now permitted). We follow the C++0x
>> +    // rules, even in C++03 mode, retroactively applying the DR.
>
> Maybe an extension warning would be appropriate here?

I've gone back and forth on this one. It's my understanding that a DR  
retroactively applies to previous standards (since it fixes a defect  
in that standard). Moreover, the whole point of DR468 is that it is  
there to help users and library developers who generate code where  
special-casing the non-dependent case leads to a big mess. Those  
clients would probably not use the feature if it emitted an extension  
warning.

	- Doug



More information about the cfe-commits mailing list