OK.
On Wed, Dec 14, 2016 at 9:05 AM, Nathan Sidwell <nat...@acm.org> wrote: > This patch fixes 78701. The problematic case with a non-type template arg > whose default value is dependent on a previous non-type arg that failed to > be deduced on the first iteration of the loop in type_unification_real. > > Just before the tsubst_template_arg we've already done: > > if (TREE_CODE (parm) == PARM_DECL > && uses_template_parms (TREE_TYPE (parm)) > && saw_undeduced < 2) > continue; > > to check the type of the arg is deduced. This patch adds the equivalent > check just after tsubsting, to see if we managed to get all the template > parms replaced. I wasn't sure if it should check for PARM_DECL, perhaps > convert_template_argument can cope with the case of a non-subst template > parm, so checking would save a call to uses_template_parms in the type-parm > case? > > Unfortunately because at this point we've pushed some state, we can't simply > 'continue'. Hence I chose to set arg to NULL and check it later. > > The deleted continue is the last statement of the loop, hence deleted. > > ok? > > nathan > -- > Nathan Sidwell