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