Another file compiles
[iotcloud.git] / version2 / src / C / Pair.h
index 192e93cd248fe27c1b7eb34c8333a52e47c539ba..4da3bf7f1a06f605817a043922ab4545b8b3546f 100644 (file)
@@ -22,4 +22,21 @@ public:
        }
 };
 
+template<typename A, typename B>
+inline unsigned int pairHashFunction(Pair<A, B> p) {
+       return (p.getFirst() << 1) ^ p.getSecond();
+}
+
+template<typename A, typename B>
+inline bool pairEquals(Pair<A, B> a, Pair<A, B> b) {
+       return ( a.getFirst() == b.getFirst() ) && (a.getSecond() == b.getSecond());
+}
+
+inline unsigned int pairHashFunction(Pair<int64_t, int64_t> p) {
+       return (p.getFirst() << 1) ^ p.getSecond();
+}
+
+inline bool pairEquals(Pair<int64_t, int64_t> a, Pair<int64_t, int64_t> b) {
+       return ( a.getFirst() == b.getFirst() ) && (a.getSecond() == b.getSecond());
+}
 #endif