[comp.lang.c++] casting pointers to member functions

vaughan@sunspot.cad.mcc.com (Paul Vaughan) (10/16/90)

Ok, language lawyer and book trivia types, this sentence of paragraph
6 of page 70 of the C++ ARM by E&S, in a section giving rules under
which explicit conversions are legal, states:

	"A pointer to member may be explicitly converted into a different
	pointer to member type when the two types are both pointers to members
	of the same class or when the two types are pointers to member
	functions of classes one of which is unambiguously derived from the
	other."

Note that in the part specifically addressing pointers to member
functions, the rule does not mention which class is derived from the
other.  First, is this statement accurate or not, and second, if it's
inaccurate , is it a known error in the book?

Another relevant statement in the book is on page 39 in a seciont
giving rules under which implicit conversion may be performed:

	"A pointer to a member of a class may be converted to a pointer to
	member of a class derived from that class provided the (inverse)
	conversion from the derived class to the base class pointer is
	accessible and provided this conversion can be done unambiguously."

Note that this is somewhat more restrictive.


 Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639
 Box 200195, Austin, TX 78720  | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan