64,662
社区成员
发帖
与我相关
我的任务
分享
class Base{
friend Base operator+(Base&, Base&);
};
class Sub: public{
friend Sub operator+(Sub& a, Sub& b){
return a + b;
}
};
friend Sub operator+(Sub& a, Sub& b)
{
return a + b;
}
class Base;
class Derive;
const Base
operator + ( const Base&, const Base& );
const Derive
operator + ( const Derive&, const Derive& );