[clang] [clang] CTAD: implement the missing IsDeducible constraint for alias templates (PR #89358)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon May 13 07:34:24 PDT 2024


================
@@ -190,13 +196,15 @@ template <class T> struct Foo { Foo(T); };
 
 template<class V> using AFoo = Foo<V *>;
 template<typename> concept False = false;
-template<False W> using BFoo = AFoo<W>;
+template<False W>
+using BFoo = AFoo<W>; // expected-note {{candidate template ignored: constraints not satisfied [with V = int]}} \
+                      // expected-note {{because '__is_deducible(BFoo, Foo<int *>)' evaluated to false}} \
----------------
hokein wrote:

I'd prefer to do it in a follow up (this patch is quite large already). Added a FIXME.

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


More information about the cfe-commits mailing list