https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105481
--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- During type_unification_real as part of partial ordering, when considering default template arguments we assume all previously deduced arguments are non-dependent and therefore default argument instantiation will be non-dependent. But I don't think that's true for partial ordering, where we may end up deducing dependent arguments e.g. deducing N for N in the comment #3 testcase.