namespace foo {
    class obj {
        friend void create() { }
    };
}

int main()
{
    foo::create();
}

test.cpp: In function 'int main()':
test.cpp:9: error: 'create' is not a member of 'foo'


-- 
           Summary: friend functions defined in-class not added to enclosing
                    namespace
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: squell at alumina dot nl


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

Reply via email to