http://llvm.org/bugs/show_bug.cgi?id=22011
Bug ID: 22011
Summary: Redundant compilation "error : reference to non-static
member function must be called"
Product: clang
Version: 3.5
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This program causes a redundant annoyng compilation "error : reference to
non-static member function must be called".
Other major C++ compilers (GC, IC, VC) don't consider this as an error.
#include <stdlib.h>
#include <stdio.h>
struct zzz
{
int m;
template<int i>
int func(const zzz &a)
{
return m = a.m + i;
}
};
template<int i, typename type>
int func(const type &a)
{
return type()./*template */func<i>(a); //error : reference to non-static
member function must be called
}
int main()
{
zzz a;
a.m = 0;
printf("%d", func<1>(a));
return 0;
}
--
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