hubert.reinterpretcast added inline comments. ================ Comment at: include/clang/AST/DeclTemplate.h:175 @@ -152,2 +174,3 @@ + Expr *RequiresClause; public: ---------------- faisalv wrote: > Yuk - this entire guy (FizedSizeTemplateParameterListStorage) seems quite > fragile (dependent on object layout) - are the gains (in the single use below > during auto-type deduction) in preformance really worth the introduction of > this fragility/ugliness? > Unless there is a clear win from this strategy, I think i'd favor (perhaps in > a later patch) - either just removing this structure and using TPL for the > use-case in auto-type below, or using placement new and creating the stack > TPL on a stack unsigned char array? > Thoughts? > I don't like the class here either; however, I would not like to introduce heap allocation just to remove it. placement-new is certainly part of the solution. I think that `TrailingObjects` should have an alias for a type that can be used as aligned storage (templated in the style of `totalSizeToAlloc`). I would like to keep that endeavour to a separate patch though.
http://reviews.llvm.org/D19322 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits