[PATCH] D81142: [MsgPack] Added a convenience operator

Dineshkumar Bhaskaran via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 04:18:06 PDT 2020


dineshkb-amd created this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Added a convenience operator


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81142

Files:
  llvm/include/llvm/BinaryFormat/MsgPackDocument.h


Index: llvm/include/llvm/BinaryFormat/MsgPackDocument.h
===================================================================
--- llvm/include/llvm/BinaryFormat/MsgPackDocument.h
+++ llvm/include/llvm/BinaryFormat/MsgPackDocument.h
@@ -181,6 +181,11 @@
     return !(Lhs < Rhs) && !(Rhs < Lhs);
   }
 
+  /// Inequality operator
+  friend bool operator!=(const DocNode &Lhs, const DocNode &Rhs) {
+    return !(Lhs == Rhs);
+  }
+
   /// Convert this node to a string, assuming it is scalar.
   std::string toString() const;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81142.268415.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/26a67de0/attachment.bin>


More information about the llvm-commits mailing list