[LLVMbugs] [Bug 13566] New: Reference to non-static member function must be called
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 9 10:52:01 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13566
Bug #: 13566
Summary: Reference to non-static member function must be called
Product: clang
Version: 3.1
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Keywords: compile-fail
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: bryanwsapp at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang version:
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
The following code (full source here
https://github.com/OpenEmu/OpenEmu/blob/master/Nestopia/core/NstMemory.hpp):
Source( pageData[i*3+0] ).SwapBank<MEM_PAGE_SIZE>( i * MEM_PAGE_SIZE,
pageData[i*3+1] | uint(pageData[i*3+2]) << 8 );
Fails with the error:
core/NstMemory.hpp:766:7: error: reference to non-static member function must
be called
Source( pageData[i*3+0]
).SwapBank<MEM_PAGE_SIZE>( i * MEM_PAGE_SIZE, pageData[i*3+1] |
uint(pageData[i*3+2]) << 8 );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The solution:
zygoloid from #llvm irc recognized the problem and gave the following fix:
<zygoloid> i would guess that Source is a dependent type within the
Nes::Core::Memory type. the fix is to add 'template' before 'SwapBank'.
<zygoloid> so Source( pageData[i*3+0] ).template SwapBank<MEM_PAGE_SIZE>( i *
MEM_PAGE_SIZE, pageData[i*3+1] | uint(pageData[i*3+2]) << 8 );
<zygoloid> instead of Source( pageData[i*3+0] ).SwapBank<MEM_PAGE_SIZE>( i *
MEM_PAGE_SIZE, pageData[i*3+1] | uint(pageData[i*3+2]) << 8 );
--
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