Hello:
---------------------------------------------------- template <class A> void foo(const A& a); template <class RET, class ARG1> void foo(RET (&)(ARG1)); float decl(int); void bar(void) { foo(decl); } ---------------------------------------------------- lambda.cc:12: error: call of overloaded 'foo(float (&)(int))' is ambiguous lambda.cc:2: note: candidates are: void foo(const A&) [with A = float ()(int)] lambda.cc:5: note: void foo(RET (&)(ARG1)) [with RET = float, ARG1 = int] I'm pretty sure that the latter overload is more specialized than the former, and EDG agress with me. Not sure if it is a regression. -- Summary: Partial ordering failure between function reference and generic const reference Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: giovannibajo at libero dot it CC: gcc-bugs at gcc dot gnu dot org,nathan at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19203