M
Mike - EMAIL IGNORED
I wrote:
class Parent
{
...
private:
virtual Parent& operator=(const Parent& parent);
};
class Child : public Parent
{
...
private:
virtual Child& operator=(const Child& parent);
};
In neither case was the operator=() defined.
With gcc 3.2, this failed to link, with undefined references
for both operator=(), notwithstanding that it was used nowhere
in my code.
The problem was corrected by removing both "virtual".
Is this expected, or is it a problem with the compiler?
Can anyone cite chapter & verse?
Thanks,
Mike.
class Parent
{
...
private:
virtual Parent& operator=(const Parent& parent);
};
class Child : public Parent
{
...
private:
virtual Child& operator=(const Child& parent);
};
In neither case was the operator=() defined.
With gcc 3.2, this failed to link, with undefined references
for both operator=(), notwithstanding that it was used nowhere
in my code.
The problem was corrected by removing both "virtual".
Is this expected, or is it a problem with the compiler?
Can anyone cite chapter & verse?
Thanks,
Mike.