On 1/18/19 1:55 AM, Alexandre Oliva wrote:
When instantiating a partial specialization of a template member
function for a full specialization of a class template, we test
whether the context of variables local to the partial specialization,
i.e., the partial specialization itself, is dependent, and this ICEs
in type_dependent_expression_p, when checking that the function type
isn't type-dependent because it is not in a type-dependent scope.
We shouldn't have got that far: the previous block in
type_dependent_expression_p catches cases in which the function itself
takes template arguments of its own, but it only did so for primary
templates, not for partial specializations. This patch fixes that.
I guess we need a different predicate than PRIMARY_TEMPLATE_P to mean
"does this have its own template arguments, not just the ones from its
enclosing class?". There are several other places that will need to be
adjusted as well.
I don't think that PRIMARY_TEMPLATE_P || DECL_TEMPLATE_SPECIALIZATION is
the right test, as I would expect that the latter will also be true of
specializations that have no template arguments of their own.
Perhaps compare the number of levels of template arguments of the
function to that of its enclosing context?
Jason