overload-address.cc: In function ‘void g()’:
overload-address.cc:6: error: address of overloaded function with no contextual
type information

while compiling this:

void f(int);
void f(double);

void g()
{
   (&f)(1.0);   // well-formed, see 13.3.1.1p3 over.match.call
}


-- 
           Summary: overload resolution not applied for (&f)()
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jens dot maurer at gmx dot net
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36975

Reply via email to