Isn't that exactly what is done in C++?
It is prepared in library code.
On 10/14/2014 12:40 PM, Marco van de Voort wrote:
I recently had to dive a bit into C++ again, and reconnected with a feature
I liked at first sight, the C++ covariance of virtual methods (changing the
return type of a
Am 14.10.2014 12:41 schrieb Marco van de Voort mar...@stack.nl:
I recently had to dive a bit into C++ again, and reconnected with a
feature
I liked at first sight, the C++ covariance of virtual methods (changing
the
return type of a overriden method to a descendant of the original type).
In our previous episode, Sven Barth said:
At least at first sight there don't seem to be any real (technical) reasons
to not covariance for return values. Parameters would be a different topic
though...
Specially since afaik we can't overload on returnvalue and require override,
so there is no
On 14 Oct 2014, at 14:21, Sven Barth wrote:
At least at first sight there don't seem to be any real (technical)
reasons
to not covariance for return values.
Delphi and/or FPC already support it to a certain extent, and the
compiler contains some code for it (see
On Tue, Oct 14, 2014 at 7:40 AM, Marco van de Voort mar...@stack.nl wrote:
I recently had to dive a bit into C++ again, and reconnected with a feature
I liked at first sight, the C++ covariance of virtual methods (changing the
return type of a overriden method to a descendant of the original
Sven Barth schrieb:
At least at first sight there don't seem to be any real (technical)
reasons to not covariance for return values. Parameters would be a
different topic though...
Just so I get the idea right:
=== code begin ===
type
TBar = class
function Test: TObject; virtual;
On 14.10.2014 15:34, Jonas Maebe wrote:
On 14 Oct 2014, at 14:21, Sven Barth wrote:
At least at first sight there don't seem to be any real (technical)
reasons
to not covariance for return values.
Delphi and/or FPC already support it to a certain extent, and the
compiler contains some code
On 15.10.2014 04:21, Hans-Peter Diettrich wrote:
Sven Barth schrieb:
At least at first sight there don't seem to be any real (technical)
reasons to not covariance for return values. Parameters would be a
different topic though...
Just so I get the idea right:
=== code begin ===
type
TBar