On 30 Jan 2006 04:56:52 -0800,
wrote:
>hi all experts,
>
>i was just thinking about making overloaded operators virtual. i was
>wordering what could be the
>implications of such scenarios.
>
>
>i will be thankful if somebody can provide point out some general
>issues in making overloaded virtual or point me to some resource
>having explaination about the same.
Have you read the FAQ yet?
http://www.parashift.com/c++-faq-lit...erloading.html
Don't forget that there is a difference between overloading and
overriding. Overloaded functions (or operators) take different
arguments, but they are in the same class or namespace. However,
virtual functions need to be overridden, which means they have to take
the same arguments in the derived class as in the base class. If you
truly overload a virtual function or operator by providing different
arguments, you will likely end up hiding the base class virtual
function or operator.
--
Bob Hairgrove