From ef768ba35319435af3fcf4171253dd32a6ecc322 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Tue, 18 Nov 2014 09:36:48 -0500 Subject: [PATCH] * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. From-SVN: r217716 --- gcc/cp/ChangeLog | 2 ++ gcc/cp/pt.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1afd3cfa46a6..117355975fa2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2014-11-18 Jason Merrill + * pt.c (instantiate_template_1): Use tsubst_aggr_type for context. + PR c++/58102 * typeck2.c (store_init_value): Set it. * cp-tree.h (CONSTRUCTOR_MUTABLE_POISON): New. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index c0f3b8c5f9f2..6661325aa496 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -15856,8 +15856,8 @@ instantiate_template_1 (tree tmpl, tree orig_args, tsubst_flags_t complain) ++processing_template_decl; if (DECL_CLASS_SCOPE_P (gen_tmpl)) { - tree ctx = tsubst (DECL_CONTEXT (gen_tmpl), targ_ptr, - complain, gen_tmpl); + tree ctx = tsubst_aggr_type (DECL_CONTEXT (gen_tmpl), targ_ptr, + complain, gen_tmpl, true); push_nested_class (ctx); } /* Substitute template parameters to obtain the specialization. */ -- 2.43.5