On Fri Dec 12, 2025 at 8:41 PM WET, Patrick Palka wrote:
>> This fix adds a NULL check and returns NULL_TREE when the type lacks
>> template info, indicating it can't be deduced.
>
> Does this mean CTAD will fail for
>
> template<class T> struct A { A(T); };
>
> using B = A<int>;
>
> template<class T=void>
> struct C : B { using B::B; };
>
> C c = 0;
>
> It's a bit of a contrived testcase but I think this should be valid and
> behave as if we used A<int> instead of B in the definition of C.
>
> To achieve that we could fall back to using TYPE_TEMPLATE_INFO if
> TYPE_TEMPLATE_INFO_MAYBE_ALIAS is NULL.
You're right! CTAD does fail for this. I'll try submitting a v2 later.