This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11235] New: pointer to memer function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]