Topic: conversion: ptr to member -> ptr to base of member (was: passing member function as a parameter)


Author: "Markus Schaaf" <m.schaaf.exp-jun2001@gmx.de>
Date: Sat, 28 Apr 2001 10:55:08 GMT
Raw View
"Ron Natalie" <ron@spamcop.net> wrote:

> GACK.  The fact that a cast is necessary here is a big tipoff.  There's
> no guarantee that this works.   Pointer to derived member is not necessarily
> convertable to pointer to base member.

That's a shame. It seems to me that this conversion is always
possible. Am I missing something? Is this simply an omission
in the standard or are there actually reasons to do so?

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]





Author: remove.haberg@matematik.su.se (Hans Aberg)
Date: Sat, 28 Apr 2001 23:35:18 GMT
Raw View
In article <9ccsbm$d1alq$1@ID-3706.news.dfncis.de>, "Markus Schaaf"
<m.schaaf.exp-jun2001@gmx.de> wrote:

See the thread "Polymorphic function pointers" for a reply.

  Hans Aberg      * Anti-spam: remove "remove." from email address.
                  * Email: Hans Aberg <remove.haberg@member.ams.org>
                  * Home Page: <http://www.matematik.su.se/~haberg/>
                  * AMS member listing: <http://www.ams.org/cml/>

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]