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

Robert Schwartz robertallanschwartz@yahoo.com
Thu May 8 22:22:00 GMT 2003


--- Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:
> Robert Schwartz <robertallanschwartz@yahoo.com> writes:
> 
> | --- 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? 
> 
> In which sense?  A pointer to member is a different kind of beast.  It
> is much more close to a struct than to a usual pointer.
> 
> -- Gaby

I'm not saying anything about how pointer-to-member is *implemented*; I'm
saying something about its syntax and its semantics. A pointer to a member
is a pointer. That's all I'm saying.

Robert

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



More information about the Gcc-bugs mailing list