[Bug c++/11235] New: pointer to memer function
adrin_jalali at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 18 13:53:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11235
Summary: pointer to memer function
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: adrin_jalali@yahoo.com
CC: gcc-bugs@gcc.gnu.org
here we want to send a member function to another non-member function. but this
is not possible and gcc can't pass and cast a member function to a non-member
finction. here is a sample code :
struct test
{
bool f(int *i) const {return *i > 10; }
};
void fun(bool (*)(int *));
int main(void)
{
test temp;
fun(temp.f); -> here can't be compiled.
}
More information about the Gcc-bugs
mailing list