diff --git a/src/mongo/base/status_with.h b/src/mongo/base/status_with.h index 0120ff3ae0c..900dac70745 100644 --- a/src/mongo/base/status_with.h +++ b/src/mongo/base/status_with.h @@ -184,22 +184,22 @@ namespace mongo { // template - bool operator==(const StatusWith& sw, const ErrorCodes& code) { + bool operator==(const StatusWith& sw, const ErrorCodes::Error code) { return sw.getStatus() == code; } template - bool operator==(const ErrorCodes::Error& code, const StatusWith& sw) { + bool operator==(const ErrorCodes::Error code, const StatusWith& sw) { return code == sw.getStatus(); } template - bool operator!=(const StatusWith& sw, const ErrorCodes::Error& code) { + bool operator!=(const StatusWith& sw, const ErrorCodes::Error code) { return !(sw == code); } template - bool operator!=(const ErrorCodes::Error& code, const StatusWith& sw) { + bool operator!=(const ErrorCodes::Error code, const StatusWith& sw) { return !(code == sw); }