src/basics.h

changeset 333
07e65a4c6611
parent 313
c24d87f64bed
child 339
4787d05e9c89
--- a/src/basics.h	Mon Jul 04 15:37:22 2022 +0300
+++ b/src/basics.h	Mon Jul 04 19:53:13 2022 +0300
@@ -60,6 +60,17 @@
 	constexpr auto operator<=>(const ModelId&) const = default;
 };
 
+struct ElementId
+{
+	std::int32_t value;
+	constexpr auto operator<=>(const ElementId& other) const = default;
+};
+
+constexpr auto qHash(ElementId id)
+{
+	return qHash(id.value);
+}
+
 //! \brief count the amount of elements in a basic array
 template<typename T, int N>
 constexpr int countof(T(&)[N])

mercurial