[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Win32 Port of Safari
From: Maks Orlovich <mo002j () mail ! rochester ! edu>
Date: 2003-01-12 6:57:16
[Download RAW message or body]
>
> They state that overloading by return type is not supported by the
> standard.
This is not an example of overloading*. The code is not asking the compiler
to pick the right one of two versions of a method based on the return
value. This is an instance of what's call covariant return -- a child class
is narrowing the return type of a re-implement function to be a specific
sub-type of what the parent's version returns.
See 10.3.5 in http://www.csci.csusb.edu/dick/c++std/cd2/derived.html for the
specific stuff in the draft version of the C++ standard.
* Although I am pretty sure some people call re-implementation that way - I
know I used to, and must have picked up the habit from someplace, and it
took at lot of unlearning to stop doing that - was worth it, though, since,
if you pardon the usage, overload of terminology tends to confuse things.
-Maksim
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic