FreeBSD/contrib/gcc/cp/name-lookup.c
/* Adds everything associated with a template argument to the lookup
   structure.  Returns true on error.  */
Adds everything associated with a template argument to the lookup
structure.  Returns true on error.
Adds everything associated with a template argument to the lookup structure . Returns true on error .
static bool
arg_assoc_template_arg (struct arg_lookup *k, tree arg)
{
  if (TREE_CODE (arg) == TEMPLATE_TEMPLATE_PARM
      || TREE_CODE (arg) == UNBOUND_CLASS_TEMPLATE)
    return false;
  else if (TREE_CODE (arg) == TEMPLATE_DECL)
    {
      tree ctx = CP_DECL_CONTEXT (arg);
      if (TREE_CODE (ctx) == NAMESPACE_DECL)
	return arg_assoc_namespace (k, ctx);
      else
	return arg_assoc_class (k, ctx);
    }
  else if (TYPE_P (arg))
    return arg_assoc_type (k, arg);
  else
    return false;
}
static bool arg_assoc_template_arg ( struct arg_lookup * k , tree arg ) { if ( TREE_CODE ( arg ) == TEMPLATE_TEMPLATE_PARM || TREE_CODE ( arg ) == UNBOUND_CLASS_TEMPLATE ) return false ; else if ( TREE_CODE ( arg ) == TEMPLATE_DECL ) { tree ctx = CP_DECL_CONTEXT ( arg ) ; if ( TREE_CODE ( ctx ) == NAMESPACE_DECL ) return arg_assoc_namespace ( k , ctx ) ; else return arg_assoc_class ( k , ctx ) ; } else if ( TYPE_P ( arg ) ) return arg_assoc_type ( k , arg ) ; else return false ; }
Adds everything associated with a template argument to the lookup
structure.
Adds everything associated with a template argument to the lookup structure .
/* [basic.lookup.koenig]

     If T is a template-id, its associated namespaces and classes are
     ... the namespaces and classes associated with the types of the
     template arguments provided for template type parameters
     (excluding template template parameters); the namespaces in which
     any template template arguments are defined; and the classes in
     which any member templates used as template template arguments
     are defined.  [Note: non-type template arguments do not
     contribute to the set of associated namespaces.  ]  */ /* Consider first template template arguments.  */ /* It's not a member template.  */ /* Otherwise, it must be member template.  */ /* It's not a template template argument, but it is a type template
     argument.  */ /* It's a non-type template argument.  */