[llvm-bugs] [Bug 33144] New: Class member arrow access on an array fails when calling member function template
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 23 11:20:05 PDT 2017
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: unassignedclangbugs at nondot.org
Reporter: barry.revzin at gmail.com
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170523/c8c65aac/attachment-0001.html>
More information about the llvm-bugs
mailing list