summaryrefslogtreecommitdiff
path: root/bson
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-03 14:11:53 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-03 14:13:07 -0500
commit5266e0fd8a0139a89ff606e690f7d9f22892abc9 (patch)
tree690b7d913b494ba22ad88defa244a2c3da2c1fb6 /bson
parente869f00e1db484d173cdec30edd1b6adff0c2878 (diff)
downloadmongo-5266e0fd8a0139a89ff606e690f7d9f22892abc9.tar.gz
OID <= operator
Diffstat (limited to 'bson')
-rw-r--r--bson/oid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bson/oid.h b/bson/oid.h
index 1fef014658f..fdf974b3064 100644
--- a/bson/oid.h
+++ b/bson/oid.h
@@ -52,6 +52,7 @@ namespace mongo {
bool operator!=(const OID& r) const { return a!=r.a || b!=r.b; }
int compare( const OID& other ) const { return memcmp( data , other.data , 12 ); }
bool operator<( const OID& other ) const { return compare( other ) < 0; }
+ bool operator<=( const OID& other ) const { return compare( other ) <= 0; }
/** @return the object ID output as 24 hex digits */
string str() const { return toHexLower(data, 12); }