diff options
author | Jason Merrill <jason@redhat.com> | 2021-06-29 15:11:25 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2021-06-29 16:50:23 -0400 |
commit | 362347c5a4e56d48c9af7ed7d9cc3feff0c2d219 (patch) | |
tree | 552cb6817f7e21bf5286bb80dc7dfb1e7f2cdc4c | |
parent | 13c906f43f473ee9ff16d80590789d719f2190a4 (diff) | |
download | gcc-362347c5a4e56d48c9af7ed7d9cc3feff0c2d219.zip gcc-362347c5a4e56d48c9af7ed7d9cc3feff0c2d219.tar.gz gcc-362347c5a4e56d48c9af7ed7d9cc3feff0c2d219.tar.bz2 |
c++: don't treat member var as var template
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.
-rw-r--r-- | gcc/cp/pt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index f2039e0..d2936c1 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -26003,7 +26003,7 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p) 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); |