This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/8171] Cannot compare pointer to member function of base and derived class
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2003 20:23:17 -0000
- Subject: [Bug c++/8171] Cannot compare pointer to member function of base and derived class
- References: <20021008110600.8171.zyzstar@ibl.sk>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.