[LLVMbugs] [Bug 7343] New: Friend declaration is ignored

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 10 02:01:53 PDT 2010


           Summary: Friend declaration is ignored
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bjorn at topel.se
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com

The following code snippet (which works for GCC 4.5 and VC 7):


template <class T>
struct Functor {

class Class {
    struct Inner {
        int a_;

    friend struct Functor<Inner>;

template <>
struct Functor<Class::Inner> {
    int operator() (Class::Inner const & key) const
        return key.a_;


functor.cc:14:23: error: 'Inner' is a private member of 'Class'
struct Functor<Class::Inner> {
functor.cc:6:12: note: declared private here
    struct Inner {
1 error generated.

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