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

             Bug #: 12690
           Summary: Friend field access in default template parameter
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


In the following code, C accesses A's field in the template parameter instanced
from B. G++ and Visual C++ both allow this if B is a friend of A. Clang does
not. I don't know what is the desired behavior here, but it's inconsistent with
other compilers at least.

template<class T, int T::*field = &T::field> class C
{
};

class A
{
    int field;

    friend class B;
};

class B
{
    C<A> field;
};

-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to