[PATCH] D19322: Concepts: Create space for requires-clause in TemplateParameterList; NFC

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 21 09:57:13 PDT 2016


faisalv added inline comments.

================
Comment at: include/clang/AST/DeclTemplate.h:175
@@ -152,2 +174,3 @@
+  Expr *RequiresClause;
 
 public:
----------------
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?



http://reviews.llvm.org/D19322





More information about the cfe-commits mailing list