This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] PR c++/42824


On 02/20/2010 03:47 PM, Dodji Seketeli wrote:
+      if (PRIMARY_TEMPLATE_P (gen_tmpl)
+	     &&  TREE_VEC_LENGTH (arglist) >  1

TMPL_ARGS_HAVE_MULTIPLE_LEVELS


+	  tree partial_inst_args;
+	  TREE_VEC_LENGTH (arglist)--;
+	  ++processing_template_decl;
+	  partial_inst_args = tsubst (CLASSTYPE_TI_ARGS (TREE_TYPE (gen_tmpl)),

I think you could take INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS here...


+				      arglist, complain, NULL_TREE);
+	  --processing_template_decl;
+	  TREE_VEC_LENGTH (arglist)++;
+	  use_partial_inst_tmpl =
+	    /*...and we must not be looking at the partial instantiation
+	     itself. */
+	    !comp_template_args (INNERMOST_TEMPLATE_ARGS (arglist),
+				 INNERMOST_TEMPLATE_ARGS (partial_inst_args));

...rather than INNERMOST_TEMPLATE_ARGS (partial_inst_args) here. Probably not a significant optimization, but we might as well.


Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]