public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19203] New: Partial ordering failure between function reference and generic const reference
@ 2004-12-30 12:19 giovannibajo at libero dot it
  2004-12-30 12:19 ` [Bug c++/19203] " giovannibajo at libero dot it
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: giovannibajo at libero dot it @ 2004-12-30 12:19 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-06-21 20:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-30 12:19 [Bug c++/19203] New: Partial ordering failure between function reference and generic const reference giovannibajo at libero dot it
2004-12-30 12:19 ` [Bug c++/19203] " giovannibajo at libero dot it
2004-12-30 12:20 ` giovannibajo at libero dot it
2004-12-30 14:29 ` [Bug c++/19203] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-01-27  5:45 ` pinskia at gcc dot gnu dot org
2005-03-24 19:05 ` [Bug c++/19203] [3.4/4.0/4.1 " nathan at gcc dot gnu dot org
2005-03-30 13:10 ` nathan at gcc dot gnu dot org
2005-03-31 17:37 ` cvs-commit at gcc dot gnu dot org
2005-03-31 17:47 ` nathan at gcc dot gnu dot org
2005-03-31 18:04 ` mmitchel at gcc dot gnu dot org
2005-04-04  9:49 ` [Bug c++/19203] [3.4/4.0 " nathan at gcc dot gnu dot org
2005-04-07  7:25 ` [Bug c++/19203] [3.4/4.0 Regression] [DR 214] " igodard at pacbell dot net
2005-05-10 13:30 ` nathan at gcc dot gnu dot org
2005-05-10 13:48 ` cvs-commit at gcc dot gnu dot org
2005-06-21 20:59 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).