summaryrefslogtreecommitdiff
path: root/src/mongo/bson/oid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/oid.h')
-rw-r--r--src/mongo/bson/oid.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/bson/oid.h b/src/mongo/bson/oid.h
index b98e070eeac..d5063dc5f1b 100644
--- a/src/mongo/bson/oid.h
+++ b/src/mongo/bson/oid.h
@@ -53,6 +53,16 @@ namespace mongo {
*/
class OID {
public:
+
+ /**
+ * Functor compatible with std::hash for std::unordered_{map,set}
+ * Warning: The hash function is subject to change. Do not use in cases where hashes need
+ * to be consistent across versions.
+ */
+ struct Hasher {
+ size_t operator() (const OID& oid) const;
+ };
+
OID() : a(0), b(0) { }
enum {