mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-28 16:24:56 +01:00
SERVER-17638 Fix StatusWith comparison operators
This commit is contained in:
parent
2aeb5a17b1
commit
39e01c7669
@ -184,22 +184,22 @@ namespace mongo {
|
||||
//
|
||||
|
||||
template<typename T>
|
||||
bool operator==(const StatusWith<T>& sw, const ErrorCodes& code) {
|
||||
bool operator==(const StatusWith<T>& sw, const ErrorCodes::Error code) {
|
||||
return sw.getStatus() == code;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator==(const ErrorCodes::Error& code, const StatusWith<T>& sw) {
|
||||
bool operator==(const ErrorCodes::Error code, const StatusWith<T>& sw) {
|
||||
return code == sw.getStatus();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator!=(const StatusWith<T>& sw, const ErrorCodes::Error& code) {
|
||||
bool operator!=(const StatusWith<T>& sw, const ErrorCodes::Error code) {
|
||||
return !(sw == code);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator!=(const ErrorCodes::Error& code, const StatusWith<T>& sw) {
|
||||
bool operator!=(const ErrorCodes::Error code, const StatusWith<T>& sw) {
|
||||
return !(code == sw);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user