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]

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


Robert Schwartz <robertallanschwartz@yahoo.com> wrote:


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

>>[bla bla bla]

> I appreciate what you are saying. I'm still confused about why the
template
> says a pointer to a member variable IS a pointer, but a pointer to a
member
> 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


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