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; 4+ 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] 4+ messages in thread
[parent not found: <bug-39328-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2021-08-04  8:12 UTC | newest]

Thread overview: 4+ 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
     [not found] <bug-39328-4@http.gcc.gnu.org/bugzilla/>
2021-07-24  1:50 ` pinskia at gcc dot gnu.org
2021-08-04  8:12 ` pinskia at gcc dot gnu.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).