On Thu, Apr 28, 2022 at 12:53:06PM -0400, Patrick Palka wrote:
> Here ever since r12-6022-gbb2a7f80a98de3 we stopped deeming the partial
> specialization #2 to be more specialized than #1 ultimately because
> dependent operator expressions now have a DEPENDENT_OPERATOR_TYPE type
> instead of an empty type, and this made unify stop deducing T(2) == 1
> for K during partial ordering for #1 and #2.
> 
> This minimal patch fixes this by making the relevant code in unify
> treat DEPENDENT_OPERATOR_TYPE like an empty type.
> 
> Bootstrapped and regtested on x86_64-pc-linux-gnu, and preapproved for
> trunk by Jason off-list.  Does this also look OK for the 12 branch?
> 
>       PR c++/105425
> 
> gcc/cp/ChangeLog:
> 
>       * pt.cc (unify) <case TEMPLATE_PARM_INDEX>: Treat
>       DEPENDENT_OPERATOR_TYPE like an empty type.
> 
> gcc/testsuite/ChangeLog:
> 
>       * g++.dg/template/partial-specialization13.C: New test.

Ok for 12.1.

        Jakub

Reply via email to