From cfe-commits Thu Feb 14 22:15:01 2013 From: Olivier Goffart Date: Thu, 14 Feb 2013 22:15:01 +0000 To: cfe-commits Subject: Re: [PATCH] Optimize pointers to member function Message-Id: <1640044.p0Ei3eb4s4 () gargamel> X-MARC-Message: https://marc.info/?l=cfe-commits&m=136088027719945 On Thursday 14 February 2013 13:49:23 John McCall wrote: > On Feb 14, 2013, at 1:42 PM, Olivier Goffart wrote: > > There I read: > > [...] If class B contains the original member, or is a base or derived > > class of the class containing the original member, the resulting pointer > > to member points to the original member. Otherwise, the result of the > > cast is undefined. > > > >> int main() { void (A::*t)() = (void(A::*)())&B::n; } > > > > So that cast is undefined. > > The original member is B::n, and A is a base class of the class containing > the original member. Ah right. Turns out I was wrong :-) Sorry for the noise. -- Olivier _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits