summaryrefslogtreecommitdiff
path: root/src/mongo/db/record_id.h
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-01-10 20:57:38 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-01-15 11:10:39 -0500
commitd26fcb64a7df86131e4951a31f07732d0d9b912f (patch)
tree93427e89fd9ad08204933321274459e19d2b3af0 /src/mongo/db/record_id.h
parent24daf1360e9bda29bf14eb209fa32d85e673a5a7 (diff)
downloadmongo-d26fcb64a7df86131e4951a31f07732d0d9b912f.tar.gz
SERVER-8994: Boost 1.56 fixes
Diffstat (limited to 'src/mongo/db/record_id.h')
-rw-r--r--src/mongo/db/record_id.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/record_id.h b/src/mongo/db/record_id.h
index 88408f5663b..5db7f7233df 100644
--- a/src/mongo/db/record_id.h
+++ b/src/mongo/db/record_id.h
@@ -29,6 +29,7 @@
#pragma once
#include <boost/functional/hash.hpp>
+#include <boost/optional.hpp>
#include <climits>
#include <ostream>
@@ -128,6 +129,10 @@ namespace mongo {
return stream << "RecordId(" << id.repr() << ')';
}
+ inline std::ostream& operator<<( std::ostream& stream, const boost::optional<RecordId>& id ) {
+ return stream << "RecordId(" << (id ? id.get().repr() : 0) << ')';
+ }
+
inline logger::LogstreamBuilder& operator<<(logger::LogstreamBuilder& stream,
const RecordId& id) {
stream.stream() << id;