PR c++/11786
* decl2.c (add_function): Do not complain about seeing the same
non-function twice.
* semantics.c (perform_koenig_lookup): Improve documentation.
PR c++/11786
* g++.dg/lookup/koenig2.C: New test.
From-SVN: r71213
2003-09-08 Mark Mitchell <mark@codesourcery.com>
+ PR c++/11786
+ * decl2.c (add_function): Do not complain about seeing the same
+ non-function twice.
+ * semantics.c (perform_koenig_lookup): Improve documentation.
+
PR c++/5296
* pt.c (try_one_overload): Add addr_p parameter.
(resolve_overloaded_unification): Pass it.
/* We must find only functions, or exactly one non-function. */
if (!k->functions)
k->functions = fn;
+ else if (fn == k->functions)
+ ;
else if (is_overloaded_fn (k->functions) && is_overloaded_fn (fn))
k->functions = build_overload (fn, k->functions);
else
}
/* Perform Koenig lookup. FN is the postfix-expression representing
- the call; ARGS are the arguments to the call. Returns the
- functions to be considered by overload resolution. */
+ the function (or functions) to call; ARGS are the arguments to the
+ call. Returns the functions to be considered by overload
+ resolution. */
tree
perform_koenig_lookup (tree fn, tree args)
2003-09-08 Mark Mitchell <mark@codesourcery.com>
+ PR c++/11786
+ * g++.dg/lookup/koenig2.C: New test.
+
PR c++/5296
* g++.dg/rtti/typeid2.C: New test.
--- /dev/null
+struct S
+{
+ template <typename T> void operator() (T) {}
+};
+
+namespace N
+{
+ S s;
+ struct A {} a;
+}
+
+using N::s;
+
+void f () { s(N::a); }
+