Old problem with performance

Kagamin spam at here.lot
Mon Feb 9 04:30:36 PST 2009


Weed Wrote:

> >>> Well, D class code here is not equivalent to C++ class code. D code has more features, namely, it's polymorphic: C.opAdd is able to work with classes, derived from C, while corresponding C++ code is unable to do so.
>  But I do not understand in what here problem. In C++ is impossible to
> do overloading with "virtual" keyword?
> Probably I badly know C ++, sorry.

In C++ you can't pass object derived from C to opAdd method. In D you can.



More information about the Digitalmars-d mailing list