This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11235] New: pointer to memer function
- From: "adrin_jalali at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2003 13:53:50 -0000
- Subject: [Bug c++/11235] New: pointer to memer function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.
}