public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/39328] New: ambiguous implicit declaration of template friend function
@ 2009-02-28 23:49 mrhelt at yahoo dot de
2009-03-01 11:07 ` [Bug c++/39328] " rguenth at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: mrhelt at yahoo dot de @ 2009-02-28 23:49 UTC (permalink / raw)
To: gcc-bugs
The following code generates two different, ambiguous declarations of foo. I
guess this is regression, as other compilers accept the code.
I am using gcc 4-3-3
template<class A,template<class>class B> void foo(B<A>)
{
}
template<class> class bar
{
template<class A,template<class>class B> friend void foo(B<A>);
};
int main(int num_arguments, char* arguments[])
{
foo(bar<int>());
/*error: call of overloaded 'foo(bar<int>)' is ambiguous
n:298: note: candidates are: void foo(B<A>) [with A = int, B = bar]
n:303: note: void foo(B<A>) [with A = int, B = bar,
<template-parameter-1-1> = int]*/
}
--
Summary: ambiguous implicit declaration of template friend
function
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mrhelt at yahoo dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39328
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-01 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-28 23:49 [Bug c++/39328] New: ambiguous implicit declaration of template friend function mrhelt at yahoo dot de
2009-03-01 11:07 ` [Bug c++/39328] " rguenth at gcc dot gnu 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).