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

Giovanni Bajo giovannibajo@libero.it
Thu May 8 00:27:00 GMT 2003

Robert Schwartz <robertallanschwartz@yahoo.com> wrote:

>>> is_pointer<int foo::*>::value (i.e. pointer to member variable)
>>> to true.

>>[bla bla bla]

> I appreciate what you are saying. I'm still confused about why the
> says a pointer to a member variable IS a pointer, but a pointer to a
> function IS NOT a pointer. This seems inconsistent to me.

Sorry, I had missed that very sentence.

It's a bug in the (now discontinued) 3.2 branch, and it's fixed in 3.3 and
3.4 (CVS 20030503). If you run your template there, you will see that both
pointer to member functions and pointer to member variables evalutate to
*false*, which is the expected consistent behaviour.

Giovanni Bajo

More information about the Gcc-bugs mailing list