Implement IRCv3 Server-Time
[quassel.git] / src / common / types.h
index a806c58..d3742b7 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2018 by the Quassel Project                        *
+ *   Copyright (C) 2005-2019 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -225,6 +225,16 @@ QDataStream& operator>>(QDataStream& in, T& value)
     return in;
 }
 
+// STL-compliant hash functor for Qt types
+template<typename T>
+struct Hash
+{
+    uint operator()(const T& t) const
+    {
+        return qHash(t);
+    }
+};
+
 // Exceptions
 
 /**