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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 08:40:23 PDT 2024


================
@@ -2010,6 +2031,25 @@ class CXXDeductionGuideDecl : public FunctionDecl {
   /// this is an implicit deduction guide.
   CXXConstructorDecl *getCorrespondingConstructor() const { return Ctor; }
 
+  /// Get the deduction guide from which this deduction guide was generated,
+  /// if it was generated as part of alias template deduction or from an
+  /// inherited constructor.
+  CXXDeductionGuideDecl *getSourceDeductionGuide() const {
----------------
AaronBallman wrote:

Yeah, we should be returning a `const` pointer from a `const` member function; we can add a non-`const` member function overload to return a non-`const` pointer if we need one.

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


More information about the cfe-commits mailing list