Class Y
contains implicitly-declared assignment operators, which hide the operator declared in the base class. In general, declaring a function in a derived class hides any function with the same name declared in a base class.
If you want to make both available in Y
, use a using-declaration:
class Y : public X {
public:
using X::operator=;
};