[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 13:41:56 PDT 2024


================
@@ -936,19 +940,21 @@ Expr *buildIsDeducibleConstraint(Sema &SemaRef,
         Context.DeclarationNames.getCXXDeductionGuideName(AliasTemplate));
   };
 
+  TemplateDecl *TD = DeducingTemplate ? DeducingTemplate : AliasTemplate;
+
   SmallVector<TypeSourceInfo *> IsDeducibleTypeTraitArgs = {
       Context.getTrivialTypeSourceInfo(
           Context.getDeducedTemplateSpecializationType(
-              TemplateName(AliasTemplate), /*DeducedType=*/QualType(),
+              TemplateName(TD), /*DeducedType=*/QualType(),
----------------
cor3ntin wrote:

Per https://eel.is/c++draft/over.match.class.deduct#1.sentence-7, 
I think we imply we should copy the constraints of the made up alias. WDYT?

Feel free to open an issue here though https://github.com/cplusplus/CWG/issues

https://github.com/llvm/llvm-project/pull/98788


More information about the cfe-commits mailing list