#pragma once #include #include #include namespace GUIStuff { struct GUIManagerID { GUIManagerID() = default; GUIManagerID(intptr_t numID); GUIManagerID(const char* strID); bool operator==(const GUIManagerID& other) const; bool idIsStr; intptr_t idNum; }; typedef std::vector GUIManagerIDStack; } template <> struct std::hash { size_t operator()(const GUIStuff::GUIManagerID& v) const { return std::hash{}(v.idNum); } }; template <> struct std::hash { size_t operator()(const GUIStuff::GUIManagerIDStack& v) const { uint64_t h = 0; for(const auto& i : v) hash_combine(h, i); return h; } };