[clang] [Clang][C++17/20] Add full support to deduction guides and CTAD alias templates (PR #193056)

Muhammad Bassiouni via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 3 19:50:44 PDT 2026


================
@@ -470,6 +470,35 @@ features cannot lower the translation-unit ABI level;
 
 - Fixed an issue where `__typeof__` incorrectly rejected cv-qualified function types.
 
+- Class template argument deduction through an alias template now works when
+  the right-hand side of the alias names another alias template that cannot
+  have deduction guides of its own, such as an identity alias
+  (`template <class T> using Identity = T;`). The deduction guides are now
+  derived from the first template in the chain that can have them, per the
+  equivalence rule of `[temp.alias]p2`, matching GCC. (#GH125821)
----------------
bassiounix wrote:

GCC is currently the only compiler that implement this feature correctly.
We have the implementation foundation but there are edge cases that are not covered by this code, that's what I'm aiming for in this patch.

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


More information about the cfe-commits mailing list