operator or.
.
C ++.
operator or , operator|| , .
:
> prog.cpp: In function βbool operator||(Type, Type)β:
> prog.cpp:8:6: error: redefinition of βbool operator||(Type, Type)β
> prog.cpp:4:6: error: βbool operator||(Type, Type)β previously defined here
ideaone:
class Type {}
};
bool operator or(Type lhs, Type rhs) {
return true;
}
bool operator ||(Type lhs, Type rhs) {
return false;
}
int main() {
Type a;
Type b;
a or b;
a || b;
}