[cfe-dev] Templates (again)

Douglas Gregor dgregor at apple.com
Mon Dec 29 19:10:46 PST 2008


On Dec 29, 2008, at 7:11 PM, Andrew Sutton wrote:

>
> I browsed through a few of these. I'm not a Mercurial user, so when  
> you think part of this is ready to go into the main tree I'll need a  
> traditional patch.
>
> Building a patch against svn shouldn't be too much trouble. I'm  
> going try to finish off the template-template param basics with ast- 
> print support (hopefully) without introducing any regressions before  
> submitting.
>

Okay.

> You'll want to add
>
>  static bool classof(const FunctionTemplateDecl *) { return true; }
>
> To TemplateDecl? Wouldn't that be handled by the TemplateFirst/ 
> TemplateLast range? It's already in FunctionTemplateDecl.

Yes, to TemplateDecl, for efficiency. If the static type is known to  
be a FunctionTemplateDecl, we skip the run-time computation that  
compares its Kind against TemplateFirst/TemplateLast.

	- Doug




More information about the cfe-dev mailing list