[clang] [clang] CTAD alias: Respect explicit deduction guides defined after the first use of the alias template. (PR #125478)

via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 3 15:19:53 PST 2025


================
@@ -237,8 +237,17 @@ static_assert(__is_same(decltype(s.t), int));
 // explicit deduction guide.
 Foo(int) -> Foo<X>;
 AFoo s2{i};
-// FIXME: the type should be X because of the above explicit deduction guide.
-static_assert(__is_same(decltype(s2.t), int));
+static_assert(__is_same(decltype(s2.t), X));
+
+
+template<class T>
+using BFoo = AFoo<T>;
----------------
antangelo wrote:

Do we also need a test case for the templated DG case?

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


More information about the cfe-commits mailing list