[LLVMbugs] [Bug 6970] New: Clang does not convert "ptr to const member function" to "ptr to member function"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 28 17:53:41 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6970
Summary: Clang does not convert "ptr to const member function"
to "ptr to member function"
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: matthewbg at google.com
CC: llvmbugs at cs.uiuc.edu, nlewycky at google.com,
dgregor at apple.com
The C++ standard doesn't explicitly allow conversion of "(T::*)() const" to
"(T::*)()". While this will hopefully be fixed at some point, in the interim it
would be great if Clang would allow this behavior as an extension. Currently
(see attached const_member_function.cc):
% clang++ -fsyntax-only const_member_function.cc
const_member_function.cc:10:3: error: no matching function for call to 'g'
g(&X::foo);
^
const_member_function.cc:6:6: note: candidate function not viable: no known
conversion from 'void (X::*)() const' to 'void (X::*)()' for 1st argument
void g(void (X::*ptr_to_member)(void)) {
^
1 error generated.
--
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