]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
include/uuid: define operator>() for uuid_d
authorKefu Chai <kchai@redhat.com>
Sun, 27 Jun 2021 03:00:03 +0000 (11:00 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 27 Jun 2021 04:25:01 +0000 (12:25 +0800)
it can be used by Option::validate() if
operator>(const variant<>&, const variant<>&) requires this.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/uuid.h

index cc735025a1815f8ab8caf2e9ba42c092e5fce7fd..ac4098a16af2c698da24dd89f19710928c5cb508 100644 (file)
@@ -92,6 +92,9 @@ inline bool operator!=(const uuid_d& l, const uuid_d& r) {
 inline bool operator<(const uuid_d& l, const uuid_d& r) {
   return l.to_string() < r.to_string();
 }
+inline bool operator>(const uuid_d& l, const uuid_d& r) {
+  return l.to_string() > r.to_string();
+}
 
 
 #endif