[LLVMbugs] [Bug 7989] New: access control misapplied to member templates

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 25 10:45:46 PDT 2010


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

           Summary: access control misapplied to member templates
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=5413)
 --> (http://llvm.org/bugs/attachment.cgi?id=5413)
testcase

I think the attached program is valid code. Clang rejects it with:

$ clang++ b2936099.cc 
b2936099.cc:12:13: error: 'ProtectedTemplate' is a protected member of 'Base'
    Tester< ProtectedTemplate<void> >();
            ^~~~~~~~~~~~~~~~~~~~~~~
b2936099.cc:1:30: note: while substituting explicitly-specified template
      arguments into function template 'Tester'
template<void (*Fun)()> void Tester() {}
                             ^
b2936099.cc:15:13: error: 'PrivateTemplate' is a private member of 'Base'
    Tester< PrivateTemplate<void> >();
            ^~~~~~~~~~~~~~~~~~~~~
2 errors 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