http://llvm.org/bugs/show_bug.cgi?id=16410
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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
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
{
private:
template <class T>
void foo(T t) {}
};
class Derived : public Base
{
public:
template <class T>
void bar(T t)
{
foo(t);
}
};
int main()
{
Derived d;
d.bar(5);
}
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs