From -3387736639506646494
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,aa5ce7ee74d4b87c,start
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-07-12 03:21:31 PST
Path: bga.com!news.sprintlink.net!hookup!news.moneng.mei.com!howland.reston.ans.net!EU.net!sunic!erinews.ericsson.se!eua.ericsson.se!euax1i2c08!konfjo
From: konfjo@eua.ericsson.se (Fredrik Jonsson)
Newsgroups: comp.std.c++
Subject: force the virtual keyword on virtual members
Date: 12 Jul 1994 07:06:17 GMT
Organization: Ellemtel Telecom Systems Labs, Stockholm, Sweden
Lines: 18
Distribution: world
Message-ID: <2vtfd9$rht@euas20.eua.ericsson.se>
Reply-To: konfjo@eua.ericsson.se
NNTP-Posting-Host: euax1i2c08.eua.ericsson.se
NNTP-Posting-User: konfjo
Keywords: virtual

Why shouldn't virtual members in a base class be forced by the compiler to be
declared as virtuals when they are overloaded in a derived class? I have been
trying to find some recommendations about this but I have failed. In OOPascal
the virtual keyword has to be declared each time a virtual function is over-
loaded but in C++ you just have to declare it in the baseclass and after that
it doesn't make any difference if the virtual keyword exists or not in front
of the virtual member function!?

I think it should be there to make the class definition easier to understand.
Someone also suggested, (in the comp.lang.c++ area), that a "overload" keyword
could be introduced to indicate that one really want to overload a virtual. I
think it's a great idea.

Is there a opinion out there about this?

Fredrik Jonsson
ELLEMTEL



