[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 10 16:06:35 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(),
----------------
antangelo wrote:
Based on the current writing of the standard I think we should be copying all of the constraints over, including the deducible constraint. However, it's probably not the intent to break existing code as in the above example.
I have filed https://github.com/cplusplus/CWG/issues/607 . Is the best course of action in the meantime to update the implementation in this PR to accept that above code, or leave it as breaking until CWG responds?
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list