On 05/05/2014 12:25 PM, Paolo Carlini wrote:
Good, but is it Ok to use uses_template_parms for that? A few days ago I struggled to find something simpler ready to use, to no avail (well, this is probably well known to you, but there are surprisingly few places in pt.c where we explain either in comments or in obvious code that we are handling full (vs partial) specializations).
+/* True if the given class type is a template or a partial specialization. */ +#define CLASSTYPE_IS_TEMPLATE_OR_PARTIAL_SPECIALIZATION(NODE) \ + (CLASSTYPE_TEMPLATE_INFO (NODE) \ + && uses_template_parms (NODE))
I think this would be true for a non-template member class of a template class. I think we want something like
CLASSTYPE_TEMPLATE_INFO (NODE) && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (NODE)) && uses_template_parms (INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (NODE))