summaryrefslogtreecommitdiffstats
path: root/src/PortID.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/PortID.hpp')
-rw-r--r--src/PortID.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/PortID.hpp b/src/PortID.hpp
index efdd78d..84c08a4 100644
--- a/src/PortID.hpp
+++ b/src/PortID.hpp
@@ -21,6 +21,7 @@
#include <iostream>
#include <string>
#include <tuple>
+#include <utility>
/// An ID for some port on a client (program)
struct PortID
@@ -133,4 +134,17 @@ operator<(const PortID& lhs, const PortID& rhs)
return false;
}
+namespace std {
+
+template<>
+struct hash<PortID::Type>
+{
+ size_t operator()(const PortID::Type& v) const noexcept
+ {
+ return hash<unsigned>()(static_cast<unsigned>(v));
+ }
+};
+
+} // namespace std
+
#endif // PATCHAGE_PORTID_HPP