Commit dbc2e334 authored by jan.koester's avatar jan.koester
Browse files

test

parent dedb6400
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,3 +21,4 @@
*.user
*.userosscache
*.sln.ide   
+16 −0
Original line number Diff line number Diff line
@@ -67,8 +67,24 @@ namespace uuid{
      bool operator<(const uuid& other) const;

      uuid_t value;

      size_t hash() const noexcept {
          size_t h = 0;
          for (int i = 0; i < 16; ++i)
              h = h * 131 + value[i];
          return h;
      }

   private:
       char *cstr;
   };
};

namespace std {
    template<> struct hash<uuid::uuid> {
        size_t operator()(const uuid::uuid &u) const noexcept {
            return u.hash();
        }
    };
};