Open
Description
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Ready for review