Consider:
struct Base {
protected:
bool operator==(const Base& other) const = default;
};
struct Child : Base {
int i;
bool operator==(const Child& other) const = default;
};
bool b = Child() == Child(); // error: deleted operator== because Base::operator== is inaccessible
CWG asks EWG to determine whether the access check for Base::operator== in the protected base class should succeed when synthesizing Child::operator==. In the status quo, the access check fails because the relevant object expression is actually of type Base.
See CWG3007 for details.
Consider:
CWG asks EWG to determine whether the access check for
Base::operator==in the protected base class should succeed when synthesizingChild::operator==. In the status quo, the access check fails because the relevant object expression is actually of typeBase.See CWG3007 for details.