http://llvm.org/bugs/show_bug.cgi?id=6827
Summary: friended template functions don't get to bypass
protections
Product: clang
Version: unspecified
Platform: Macintosh
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
clang++ fails to correctly respect friend specifier in template class pointing
to a template function
struct Test { int i; };
template <typename T> class Foo;
template <typename T> Foo<T> foo(T* t){ return Foo<T>(t, true); }
template <typename T> class Foo {
public:
Foo(T*);
friend Foo<T> foo<T>(T*);
private:
Foo(T*, bool);
};
Test globalT;
Foo<Test> f = foo(&globalT);
Compiles in g++ but fails in clang :-(
--
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