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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 16 19:56:49 PST 2025


antangelo wrote:

I'm still working on addressing the remaining comments, primarily the one from Erich about insufficient handling of nested templates. There are some issues when the derived class is in a nested template, and the base specifier depends on the outer template arguments, where the CC type we create has arguments substituted at the wrong levels when used in a deduction guide. I haven't had time to debug this fully, but my suspicion is that it has something to do with placing the CC template inside the outer template specialization without it being defined in the outer template pattern (but this suspicion may be wrong).

I don't know if I'll be able to fix these issues before clang 20 branches. The best way forward might be for me to:

1. Split out the deduction guide source tracking into its own patch, so that completing the alias deduction guide feature is no longer blocked on this (which is something I probably should've done to begin with)
2. If we want to land the portion of this feature that is done so far, we can land it without support for nested templates where the base specifier depends on outer template arguments (with some detection for this case and perhaps a diagnostic note) and then revisit this in a follow-up. I'll defer to other maintainers as to whether or not this is an option we want to pursue.
3. Otherwise, this feature will likely need to wait for clang 21.

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


More information about the cfe-commits mailing list