While looking at a partial instantiation issue I noticed that we were
wrongly hitting the partial instantiation code when instantiating a static
data member of a class template. I don't think this broke anything, but we
don't need to do that (small) extra work.
gcc/cp/ChangeLog:
* pt.c (instantiate_decl): Only consider partial specializations of
actual variable templates.
td = template_for_substitution (d);
args = gen_args;
- if (VAR_P (d))
+ if (variable_template_specialization_p (d))
{
/* Look up an explicit specialization, if any. */
tree tid = lookup_template_variable (gen_tmpl, gen_args);