&& DECL_DEFINED_IN_CLASS_P (decl))
&& DECL_CLASS_CONTEXT (decl) == current_class_type  && (!DECL_FUNCTION_MEMBER_P (decl) || DECL_DEFINED_IN_CLASS_P (decl)))
check_default_tmpl_args (decl, parms, is_primary, is_partial)     tree decl;     tree parms;     int is_primary;     int is_partial;{  const char *msg;  int   last_level_to_check;  /* [temp.param]      A default template-argument shall not be specified in a     function template declaration or a function template definition, nor     in the template-parameter-list of the definition of a member of a     class template.  */  if (current_class_type      && !TYPE_BEING_DEFINED (current_class_type)      && DECL_REAL_CONTEXT (decl) == current_class_type      && DECL_LANG_SPECIFIC (decl)      && DECL_DEFINED_IN_CLASS_P (decl))     /* We already checked these parameters when the template was       declared, so there's no need to do it again now.  This is an       inline member function definition.  */    return;  if (TREE_CODE (decl) != TYPE_DECL || is_partial || !is_primary)    /* For an ordinary class template, default template arguments are       allowed at the innermost level, e.g.:         template <class T = int>	 struct S {};       but, in a partial specialization, they're not allowed even       there, as we have in [temp.class.spec]:     	 The template parameter list of a specialization shall not	 contain default template argument values.         So, for a partial specialization, or for a function template,       we look at all of them.  */    ;  else    /* But, for a primary class template that is not a partial       specialization we look at all template parameters except the       innermost ones.  */    parms = TREE_CHAIN (parms);  /* Figure out what error message to issue.  */  if (TREE_CODE (decl) == FUNCTION_DECL)    msg = "default argument for template parameter in function template `%D'";  else if (is_partial)    msg = "default argument in partial specialization `%D'";  else    msg = "default argument for template parameter for class enclosing `%D'";  if (current_class_type && TYPE_BEING_DEFINED (current_class_type))    /* If we're inside a class definition, there's no need to       examine the parameters to the class itself.  On the one       hand, they will be checked when the class is defined, and,       on the other, default arguments are legal in things like:         template <class T = double>         struct S { template <class U> void f(U); };       Here the default argument for `S' has no bearing on the       declaration of `f'.  */    last_level_to_check = template_class_depth (current_class_type) + 1;  else    /* Check everything.  */    last_level_to_check = 0;  for (; parms && TMPL_PARMS_DEPTH (parms) >= last_level_to_check;        parms = TREE_CHAIN (parms))    {      tree inner_parms = TREE_VALUE (parms);      int i, ntparms;      ntparms = TREE_VEC_LENGTH (inner_parms);      for (i = 0; i < ntparms; ++i) 	if (TREE_PURPOSE (TREE_VEC_ELT (inner_parms, i)))	  {	    if (msg)	      {		cp_error (msg, decl);		msg = 0;	      }	    /* Clear out the default argument so that we are not	       confused later.  */	    TREE_PURPOSE (TREE_VEC_ELT (inner_parms, i)) = NULL_TREE;	  }      /* At this point, if we're still interested in issuing messages,	 they must apply to classes surrounding the object declared.  */      if (msg)	msg = "default argument for template parameter for class enclosing `%D'";     }}