I don't think it should be ambiguous. Both D<n,n> and D<1,n> match, and the
partial specialization rules say that the one that is most specialized wins.
D<1,n> is most specialized.

But, D<1,n> isn't more specialized than D<n,n>.
If I remember correctly, you have to synthesize a unique constant for
non-type template arguments and then try to deduce the template
arguments of the other specialization. But in that case, argument
deduction will fail, because the synthesized constant isn't equal to 1.
bye, Christof

I don't think it should be ambiguous. Both D<n,n> and D<1,n> match, and

the

partial specialization rules say that the one that is most specialized

wins.

D<1,n> is most specialized.

But, D<1,n> isn't more specialized than D<n,n>.
If I remember correctly, you have to synthesize a unique constant for
non-type template arguments and then try to deduce the template
arguments of the other specialization. But in that case, argument
deduction will fail, because the synthesized constant isn't equal to 1.