https://bugs.llvm.org/show_bug.cgi?id=33144
Bug ID: 33144
Summary: Class member arrow access on an array fails when
calling member function template
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: barry.rev...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
The following example:
struct X {
template <class >
void f() { }
void g() { }
};
int main() {
X x[1];
x->g();
x->f<int>();
}
Fails to compile with:
foo.cxx:10:8: error: no template named 'f'; did you mean 'X::f'?
x->f<int>();
^
X::f
foo.cxx:3:10: note: 'X::f' declared here
void f() { }
^
Using x->X::f<int>() works as does (*x).f<int>(). The non-template call x->g()
is ok. clang 3.4 thru 4.0 all yield the same error. gcc accepts the program.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs