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]

[Bug c++/8171] Cannot compare pointer to member function of base and derived class


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8171



------- Additional Comments From bangerth at dealii dot org  2003-07-22 20:23 -------
Just for more references into the standard: 4.11/2 describes the conversion
from pointer-to-member-of-base to ptm-of-derived. 5.10/2 states that this
conversion has to happen.

Just out of curiosity: the conversion is really not all that trivial, since
when you cast &B::f to &D::f you may need to use a thunk to adjust the
this pointer, right? Or is this implemented by having a pointer-to-
member-type be a tuple of pointer and this-adjustment?

W.


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