[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 27 18:52:31 PDT 2024
================
@@ -1398,5 +1807,30 @@ void Sema::DeclareImplicitDeductionGuides(TemplateDecl *Template,
->getTemplatedDecl())
->setDeductionCandidateKind(DeductionCandidate::Copy);
+ CXXRecordDecl *TemplatedDecl = Pattern->getTemplatedDecl();
+ if (getLangOpts().CPlusPlus23 && TemplatedDecl->hasDefinition()) {
----------------
antangelo wrote:
Given the uncertainty with open CWG issues and the potential breakage of code on earlier standards versions, I think it's less risky to keep it constrained to C++23 for now. It's probably worth revisiting in the future, though.
https://github.com/llvm/llvm-project/pull/98788
More information about the cfe-commits
mailing list