[Bug c++/17448] New: Dails to detect duplicate definition

igodard at pacbell dot net gcc-bugzilla@gcc.gnu.org
Mon Sep 13 00:58:00 GMT 2004


void Foo();
struct B;
template<typename T> struct A {
    friend
    void Bar(A& a, B b) { }
    };
struct B {
    template<typename T>
    friend
    void Bar(A<T>& a, B b) { Foo(); }
    };
int main() {
    A<int> a; B b;
    Bar(a, b);
    return 0; }


The two Bar's are the same function, friended into two different classes, but have different definitions.

Ivan

-- 
           Summary: Dails to detect duplicate definition
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: igodard at pacbell dot net
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list