[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug c++/39328] New: ambiguous implicit declaration of template friend function
From: "mrhelt at yahoo dot de" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2009-02-28 23:48:53
Message-ID: bug-39328-17375 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic