[LLVMbugs] [Bug 8448] New: non-sfinae error: is a private member
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Oct 23 15:09:42 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8448
Summary: non-sfinae error: is a private member
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: marc.glisse at normalesup.org
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Hello,
when I compile this code:
class A { typedef int priv; };
void f(A,A){}
template <class T> void f(T,typename T::priv){}
void g(){f(A(),A());}
I get the error:
h.C:3:41: error: 'priv' is a private member of 'A'
template <class T> void f(T,typename T::priv){}
^
h.C:3:25: note: while substituting deduced template arguments into function
template 'f' [with T = A]
template <class T> void f(T,typename T::priv){}
^
First, I am not sure whether this is supposed to be an error (it is certainly
painful if it is).
Second, in any case, the error message is missing a crucial piece of
information which is where the function was called from (line 4). Is there some
option to make it appear? I understand that quite often the instantiation
context is spam in the error message, but here it would help.
--
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