[LLVMbugs] [Bug 8146] New: Clang incorrectly emitting 'is a private member of' error for templated friend class

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 14 09:55:56 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=8146

           Summary: Clang incorrectly emitting 'is a private member of'
                    error for templated friend class
           Product: new-bugs
           Version: 2.8
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: mike.gist at imgtec.com
                CC: llvmbugs at cs.uiuc.edu


I failed to find a less complex example of this issue, so apologies for the
amount of code.

See hash.h for the problematic code, test.cpp is a preprocessed file including
this header which clang++ will emit errors on.

In the class 'HashElement' the class 'csHash' is declared as a friend. However,
accesses to the private 'key' and 'value' members of the HashElement objects in
csHash member functions trigger the 'is a private member of' error.

Both GCC and MSVC can compile the example code with no errors.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list