[cfe-dev] some notes about templates

Larry Evans cppljevans at suddenlink.net
Sat Jun 29 11:00:25 PDT 2013


On 06/28/13 19:07, Nick Lewycky wrote:
[snip]
> ActiveTemplateInstantiations shouldn't be a SmallVector in Sema, they
> should be allocated by a BumpPtrAllocator in ASTContext. Then we can put
> ActiveTemplateInstantions in the AST, which will requiring changing it a
> bit (no pointers to sema:: objects), but we also want to add a template
> depth, correct point-of-instantiation SourceLocation and add missing
> instantiation records (such as instantiation due to overload
> resolution). An awesome outcome of this will be that we'll be able to
> produce template stack traces even when we aren't actively doing
> template instantiation. That would in turn allow us to do other things
> like flatten instantiation instead of making it recursive.
> 
Would this flattening speed compile times?  Long compile times
is one strong reason why boost preprocessor is used to implement tuples:

http://article.gmane.org/gmane.comp.lib.boost.devel/235386


-regards,
Larry





More information about the cfe-dev mailing list