This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

g++ 2.95.2 fails to reject an ambiguous overload


Hi,

the program below compiles with g++ 2.95.2 despite the ambiguity
between #1 and #2 (see 14.5.5.2, p5).

Thanks
Martin



template <class T>
void foo (T) { }

template <class T>
void foo (T&) { }

int main ()
{
    bool b = false;
    foo (b);
}


--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]