[C++ PATCH] [PR87770] test partial specializations for type dependence
Jason Merrill
jason@redhat.com
Thu Jan 24 15:15:00 GMT 2019
On 1/23/19 10:53 PM, Alexandre Oliva wrote:
> On Jan 21, 2019, Jason Merrill <jason@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
More information about the Gcc-patches
mailing list