20 #ifndef KERNEL_UTILITIES_PAIR_H 21 #define KERNEL_UTILITIES_PAIR_H 23 #include "pedigree/kernel/processor/types.h" 24 #include "pedigree/kernel/utilities/template.h" 29 template <
class T1,
class T2>
33 Pair() : m_First(), m_Second()
36 Pair(
const T1 &a,
const T2 &b)
42 const T1 &first()
const 47 const T2 &second()
const 57 template <
class T1,
class T2>
60 return (left.first() == right.first()) && (left.second() == right.second());
63 template <
class T1,
class T2>
66 return (left.first() != right.first()) || (left.second() != right.second());
69 template <
class T1,
class T2>
70 bool operator<(const Pair<T1, T2> &left,
const Pair<T1, T2> &right)
72 if (left.first() < right.first())
76 else if (right.first() < left.first())
81 return left.second() < right.second();
84 template <
class T1,
class T2>
85 bool operator<=(const Pair<T1, T2> &left,
const Pair<T1, T2> &right)
87 return !(right < left);
90 template <
class T1,
class T2>
96 template <
class T1,
class T2>
99 return !(left < right);
102 template <
typename T1,
typename T2>
bool operator==(const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T1 > &x1, const Iterator< originalT, Struct, FunctionPrev, FunctionNext, T2 > &x2)
bool operator!=(const T1 &x1, const T2 &x2)
Global != operator for types with overloaded == operator.