You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2014/02/20 08:47:50 UTC

[5/5] git commit: Added != operator to future.

Added != operator to future.

Review: https://reviews.apache.org/r/18204


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0178e0f5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0178e0f5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0178e0f5

Branch: refs/heads/master
Commit: 0178e0f5a5e2226646a6686e281c0270b77e4b58
Parents: 53a3f41
Author: Benjamin Hindman <be...@gmail.com>
Authored: Sun Feb 16 11:57:13 2014 -0800
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Wed Feb 19 23:45:52 2014 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/include/process/future.hpp | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/0178e0f5/3rdparty/libprocess/include/process/future.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/include/process/future.hpp b/3rdparty/libprocess/include/process/future.hpp
index 2f57377..e45f4f7 100644
--- a/3rdparty/libprocess/include/process/future.hpp
+++ b/3rdparty/libprocess/include/process/future.hpp
@@ -98,6 +98,7 @@ public:
 
   // Comparision operators useful for using futures in collections.
   bool operator == (const Future<T>& that) const;
+  bool operator != (const Future<T>& that) const;
   bool operator < (const Future<T>& that) const;
 
   // Helpers to get the current state of this future.
@@ -976,6 +977,13 @@ bool Future<T>::operator == (const Future<T>& that) const
 
 
 template <typename T>
+bool Future<T>::operator != (const Future<T>& that) const
+{
+  return !(*this == that);
+}
+
+
+template <typename T>
 bool Future<T>::operator < (const Future<T>& that) const
 {
   return data < that.data;