[LLVMbugs] [Bug 16410] New: Access control ignored in member template function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 21 12:26:14 PDT 2013


            Bug ID: 16410
           Summary: Access control ignored in member template function
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: w.shane.grant at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Access control (e.g. private) seems to be ignored for template functions
calling other template functions that do no explicitly instantiate them. 
Consider the following example:

class Base
    template <class T>
    void foo(T t) {}

class Derived : public Base
    template <class T>
    void bar(T t)

int main()
  Derived d;

This compiles (clang version 3.3 (trunk 178896) (llvm/trunk 178895)) even
though foo should be inaccessible to Derived.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130621/da7a3559/attachment.html>

More information about the llvm-bugs mailing list