PLEASE REPLY TO [EMAIL PROTECTED] ONLY, *NOT* [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]

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.
}

Reply via email to