c++/10649: is_pointer<T> reports pointer to member function is not a pointer

Robert Schwartz robertallanschwartz@yahoo.com
Wed May 7 23:35:00 GMT 2003


--- giovannibajo@libero.it wrote:
> Synopsis: is_pointer<T> reports pointer to member function is not a pointer
> 
> State-Changed-From-To: open->closed
> State-Changed-By: bajo
> State-Changed-When: Wed May  7 00:40:10 2003
> State-Changed-Why:
>     No, a member function pointer cannot match "T*". What would
>     be T, in fact?

is_pointer<int foo::*>::value (i.e. pointer to member variable) evaluates to true.
If I remove the * from "int foo::*", then I get "int foo::".
I know this isn't a valid C++ type, but a pointer to a member variable is still a pointer, no?

If I remove the * from "int (foo::*)(void)", then I get "int (foo::)(void)".
I know this isn't a valid C++ type, but a pointer to a member function is still a pointer, no?

> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10649


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Gcc-bugs mailing list