Article View: comp.std.c++
Article #207Can we allow virtual function member declarations to be inherited?
From: Webster &
Date: Wed, 01 Aug 1990 02:21
Date: Wed, 01 Aug 1990 02:21
38 lines
2050 bytes
2050 bytes
That way a user will write a definition for the body of a derived
class virtual function without declaring it in the derived class
definition. The derived class declaration element for the virtual
function is then inherited from an ancestral base class and the
inherited declaration and explicit definition MUST MATCH or a compile
time error occurs.
This would be substantially better than the current situation in which
given a mistaken difference between the intended base class virtual
function calling sequence and the actual derived class calling
sequence you just end up with a new virtual function at the level of
the derived class with no warning whatever about potential
misbehavior.
This is problem with a substantial probability of occurance since I
have seen this situation occur independently to two different
InterViews users.
This approach will save people who use public libraries from getting
shafted when a minor change happens in the calling syntax of some
virtual during a library update.
This approach will save people who misdefine the virtual definition in
a minor way.
This approach will be backward compatible, since redeclaration of the
virtual function in the derived class definition will have no effect.
Web
--
Dr. Webster Dove Dr. Webster Dove
Experimental Computing Systems ('X') Lockheed Sanders Inc.
Signal Processing Center of Technology 144 Daniel Webster Hwy.
Lockheed Sanders Inc. Merrimack, NH. 03054
email:
(usenet) ...!uunet!rocket!dove
(or internet) <rocket!dove@uunet.uu.net>
Technical Details
Message-ID:
<DOVE.90Jul31222153@rocket.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!rocket!doveShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!rocket!dove From: dove@rocket.uucp (Webster &) Newsgroups: comp.std.c++ Subject: Can we allow virtual function member declarations to be inherited? Message-ID: <DOVE.90Jul31222153@rocket.uucp> Date: 1 Aug 90 02:21:53 GMT Sender: news@rocket.UUCP Distribution: comp Organization: Lockheed Sanders Inc. Lines: 38