memgraph/include/utils/eq_wrapper.hpp
Kruno Tomola Fabro 3fffa17b0d Started adding remove methods.
Discovered bugs in HashMultiMap and after fixing it add method is now little slower but
find method is medium faster. So it turned out good.
2016-08-10 20:02:54 +01:00

21 lines
314 B
C++

#pragma once
template <class T>
class EqWrapper
{
public:
EqWrapper(T t) : t(t) {}
friend bool operator==(const EqWrapper &a, const EqWrapper &b)
{
return a.t == b.t;
}
friend bool operator!=(const EqWrapper &a, const EqWrapper &b)
{
return !(a == b);
}
T t;
};