[Bug c++/11235] pointer to memer function
adrin_jalali at yahoo dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 18 14:49: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
------- Additional Comments From adrin_jalali at yahoo dot com 2003-06-18 14:49 -------
Subject: Re: pointer to memer function
that's true, but this code can't be compiled too, why?
struct test
{
bool f(int *i) const {return *i > 10; }
};
void fun(bool (test::*)(int *));
int main(void)
{
test temp;
fun(temp.f); -> here can't be compiled again.
}
--- bangerth at dealii dot org <gcc-bugzilla@gcc.gnu.org> wrote:
> 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
>
>
> bangerth at dealii dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> ------- Additional Comments From bangerth at dealii dot org 2003-06-18 14:01
> -------
> gcc is just right. A member function has type
> bool (test::*) (int *)
> and so doesn't match the argument of fun().
>
> W.
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
More information about the Gcc-bugs
mailing list