+2003-03-20 Mark Mitchell <mark@codesourcery.com>
+
+ * cp/decl2.c (arg_assoc_class): Correct check for namespace-scope
+ friends.
+ * cp/pt.c (instantiate_class_template): Fix formatting.
+
2003-03-14 Matt Austern <austern@apple.com>
* cp-tree.h (unemitted_tinfo_decls): Declaration of a new varray.
friends = TREE_CHAIN (friends))
/* Only interested in global functions with potentially hidden
(i.e. unqualified) declarations. */
- if (decl_namespace (TREE_VALUE (friends)) == context)
+ if (CP_DECL_CONTEXT (TREE_VALUE (friends)) == context)
if (add_function (k, TREE_VALUE (friends)))
return true;
--processing_template_decl;
}
else
- {
- /* Build new DECL_FRIENDLIST. */
-
- add_friend (type,
- tsubst_friend_function (t, args));
- }
+ /* Build new DECL_FRIENDLIST. */
+ add_friend (type, tsubst_friend_function (t, args));
}
}
+2003-03-20 Mark Mitchell <mark@codesourcery.com>
+
+ * g++.dg/template/friend17.C: New test.
+
2003-03-21 Alan Modra <amodra@bigpond.net.au>
* gcc.c-torture/compile/20030320-1.c: New.
--- /dev/null
+template <class T>
+struct X {
+ template <class U> void operator+=(U);
+
+ template <class V>
+ template <class U>
+ friend void X<V>::operator+=(U);
+};
+
+int main() {
+ X<int>() += 1.0;
+}