2006-01-13 Jason Merrill <jason@redhat.com>
+ * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
+
* name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
* pt.c (check_explicit_specialization): Likewise.
/* Find the namespace binding, using the declaration
context. */
- fns = lookup_qualified_name (current_namespace, dname,
+ fns = lookup_qualified_name (CP_DECL_CONTEXT (decl), dname,
false, true);
if (!fns || !is_overloaded_fn (fns))
{
else
{
tree fn = OVL_CURRENT (fns);
- if (!is_associated_namespace (current_namespace,
+ if (!is_associated_namespace (CP_DECL_CONTEXT (decl),
CP_DECL_CONTEXT (fn)))
error ("%qD is not declared in %qD",
decl, current_namespace);