class C { public: void operator =(int i) {} }; class SubC : public C { };
以下是编译错误:
SubC subC; subC = 0;
“’subC = 0’中的’operator =’不匹配”
一些消息来源声明这是因为赋值运算符不是继承的.但这不仅仅是因为SubC的默认构造拷贝分配掩盖了它们吗?
class C { public: void operator =(int i) {} }; class SubC : public C { public: using C::operator=; };