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

            Bug ID: 19140
           Summary: protected typedef not accessible in derived class
           Product: clang
           Version: 3.4
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

The following code snippet does not compile using clang but according to the
standard it is valid: 

class A {
     protected:
         struct B { };
};

struct D: A::B, A { };

clang fails with "error: 'B' is a protected member of 'A'" 

According to the current standard
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf), this is
valid  because 

"the use of A::B as a base-specifier is well-formed because D is derived from
A, so checking of base-specifiers must be deferred until the entire
base-specifier-list has been seen."

-- 
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