On 1/23/19 10:53 PM, Alexandre Oliva wrote:
On Jan 21, 2019, Jason Merrill <ja...@redhat.com> wrote:

"does this have its own template arguments, not just the ones from its
enclosing class?"

Perhaps compare the number of levels of template arguments of the
function to that of its enclosing context?

Is this the logic you had in mind?  Or can we assume DECL_P to always be
false at that point, because if the context has template info it must be
a class?  (I'm not sure about the context of generic lambdas)

The latter; you can't have a partial specialization in a function. But you can have them at namespace scope, so still need to avoid checking CLASSTYPE_TI_TEMPLATE for a non-class.

Any suggestion of a good name for the inline function (or would you
prefer it to be a macro?) that tests whether a decl satisfies this
predicate?  primary_or_partial_spec_p?

Sounds good.

Jason

Reply via email to