pt.c (tsubst_decl): SET_DECL_IMPLICIT_INSTANTIATION before register_specialization.

* pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
	before register_specialization.

From-SVN: r223461
This commit is contained in:
Jason Merrill 2015-05-20 17:32:52 -04:00 committed by Jason Merrill
parent 1210105350
commit 226a93b7b7
3 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2015-05-20 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl) [VAR_DECL]: SET_DECL_IMPLICIT_INSTANTIATION
before register_specialization.
* decl.c (grok_op_properties): Don't complain about size_t
placement delete here.
* call.c (second_parm_is_size_t): Split out from...

View File

@ -11407,9 +11407,9 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
processing here. */
DECL_EXTERNAL (r) = 1;
register_specialization (r, gen_tmpl, argvec, false, hash);
DECL_TEMPLATE_INFO (r) = build_template_info (tmpl, argvec);
SET_DECL_IMPLICIT_INSTANTIATION (r);
register_specialization (r, gen_tmpl, argvec, false, hash);
}
else if (!cp_unevaluated_operand)
register_local_specialization (r, t);

View File

@ -0,0 +1,9 @@
// { dg-do compile { target c++14 } }
namespace A
{
template <class T> int I = 0;
template <class T> int I<T*> = 42;
}
int i = A::I<void*>;