diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-01-10 20:57:38 -0500 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-01-15 11:10:39 -0500 |
commit | d26fcb64a7df86131e4951a31f07732d0d9b912f (patch) | |
tree | 93427e89fd9ad08204933321274459e19d2b3af0 /src/mongo/db/record_id.h | |
parent | 24daf1360e9bda29bf14eb209fa32d85e673a5a7 (diff) | |
download | mongo-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.h | 5 |
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; |