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: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs