pkgsrc/net/xorp/patches/patch-libxorp_timeval.hh
joerg 3d75da359e Don't use rel_ops, it can create ambiguity for types that define more
than the minimal operator set. Rename out_of_range.
2013-06-13 21:48:09 +00:00

33 lines
804 B
C++

$NetBSD: patch-libxorp_timeval.hh,v 1.1 2013/06/13 21:48:09 joerg Exp $
--- libxorp/timeval.hh.orig 2013-06-13 18:08:49.000000000 +0000
+++ libxorp/timeval.hh
@@ -239,6 +239,9 @@ public:
* right-hand operand.
*/
bool operator==(const TimeVal& other) const;
+ bool operator!=(const TimeVal& other) const {
+ return !(*this == other);
+ }
/**
* Less-Than Operator
@@ -249,6 +252,18 @@ public:
*/
bool operator<(const TimeVal& other) const;
+ bool operator>(const TimeVal& other) const {
+ return other < *this;
+ }
+
+ bool operator>=(const TimeVal& other) const {
+ return other <= *this;
+ }
+
+ bool operator<=(const TimeVal& other) const {
+ return *this <= other || *this == other;
+ }
+
/**
* Assign-Sum Operator
*