class A
{
public:
A(){};
friend A operator + (const A&,const A&)
{
return A();
};
};
class B : public A
{
private:
B(const A&){};
friend B operator + (const B& b1,const B& b2)
{
return operator + (static_cast<const A&>(b1),static_cast<const A&>(b2));
}
};
Posted via RSDN NNTP Server 1.9 gamma