Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!stan!garya From: garya@Solbourne.COM (Gary Aitken) Newsgroups: comp.lang.c++ Subject: Re: ptr to member function, even worse Message-ID: <1018@garya.Solbourne.COM> Date: 8 May 89 15:05:44 GMT Organization: Solbourne Computer Inc., Longmont, Co. Lines: 20 > Thus there is no portable solution in C++ > for the problem as you have stated it, and I believe there is no solution > at all in AT&T C++ 2.0. The best alternative is to be sure that dispatch > knows at least the base class of objp, either by defining a ``universal'' > base class, or by overloading dispatch (perhaps parameterizing it). The word we have is that 2.0 will solve the problem by passing a descriptor for virtual functions, instead of an offset into the virtual table. The descriptor contains enough info to find the base class. As described in a previous article, there is no way I can have a "universal" base class without putting constraints on the application program, which I don't want to do. The big benefit of "pointer to function" is precisely that you don't need to know anything about the function; otherwise, it would be just as easy to make a big jump table and pass an index (yeah, I know, in concept, not necessarily so in practice). -- Gary Aitken Solbourne Computer Inc. ARPA: garya@Solbourne.COM Longmont, CO UUCP: ...!{boulder,sun}!stan!garya