[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: AW: Binaries for Windows NT
From: |
David Philippi |
Subject: |
Re: AW: AW: Binaries for Windows NT |
Date: |
Fri, 27 Sep 2002 10:27:07 +0200 |
User-agent: |
KMail/1.4.1 |
On Thursday 26 September 2002 23:41, Ingo Ruhnke wrote:
> Component is an abstract class, so return by Value is impossible and
> illegal, gcc doesn't catch this and since all those operator=() stuff
> placed there in a hurry nobody noticed this. For all abstract classes
> the operator=() can be removed.
Well, the real bug is that I created all those operator=() wrong - the
correct way is to return a reference to the class. Declaring operator=() may
be required for abstract classes too since noone stops you from having
abstract classes with data members. A derived class then must call
operator=() of the abstract base class in it's own operator=().
Just changing the return value to Component& (not const &) should remove the
compile errors for good.
I'll do this for every operator=() very soon anyway so a little bit of
waiting will remove the work for you. ;-)
Bye David