[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

Sebastian Redl sebastian.redl at getdesigned.at
Mon Mar 30 23:13:26 PDT 2009


On Mon, 30 Mar 2009 20:39:08 -0700, Douglas Gregor <dgregor at apple.com>
wrote:
> 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.
> 

I agree. I think DRs should be made to apply in our implementation of
C++03, even if they were only introduced with C++0x.

Sebastian



More information about the cfe-commits mailing list