www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/15/06:28:23

From: Paul Harness <gapa83 AT udcf DOT gla DOT ac DOT uk>
Subject: Re: JED and djgpp
To: wrh AT placer1 DOT wimsey DOT com
Date: Mon, 15 Aug 1994 10:04:01 +0100 (BST)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)

> Thanks to all those who responded to my question about the function
> pointers internal to classes.  The solution was:  don't do that.
> I'm still going to try to explicitly cast the 'this' pointer,
> which I had forgotten about.  There just has to be a way, in the end, 
> its just a function address ... Ooh Ick.
> 
Don't try to cast a pointer-to-member to a pointer-to-function, the
result is undefined. The ONLY ways around are to use a static member or
a non-class wrapper function. For more info see Marshall Cline's
excellent C++ FAQ available on comp.lang.c++. (In particular Section
17). 

Paul.

-- 
Paul Harness,                        |  Internet: gapa83 AT udcf DOT gla DOT ac DOT uk
Department of Physics and Astronomy, |
University of Glasgow,               |  Tel +44-41-339-8855 ext 8359
Glasgow, G12 8QQ, SCOTLAND.          |  Fax +44-41-334-9029

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019