diff options
Diffstat (limited to 'src/mongo/executor/remote_command_response.cpp')
-rw-r--r-- | src/mongo/executor/remote_command_response.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mongo/executor/remote_command_response.cpp b/src/mongo/executor/remote_command_response.cpp index a0b1baeeb79..ab67febd598 100644 --- a/src/mongo/executor/remote_command_response.cpp +++ b/src/mongo/executor/remote_command_response.cpp @@ -48,5 +48,21 @@ std::string RemoteCommandResponse::toString() const { << " cmd:" << data.toString(); } +bool RemoteCommandResponse::operator==(const RemoteCommandResponse& rhs) const { + if (this == &rhs) { + return true; + } + return data == rhs.data && metadata == rhs.metadata && elapsedMillis == rhs.elapsedMillis; +} + +bool RemoteCommandResponse::operator!=(const RemoteCommandResponse& rhs) const { + return !(*this == rhs); +} + } // namespace executor + +std::ostream& operator<<(std::ostream& os, const executor::RemoteCommandResponse& response) { + return os << response.toString(); +} + } // namespace mongo |