From 180e47936535763242fca14773f04126d792555f Mon Sep 17 00:00:00 2001 From: Vladyslav Baranovskyi Date: Sun, 10 Nov 2024 18:38:01 +0200 Subject: [PATCH] I forgot to add hash class to int24... Sorry! --- openVulkanoCpp/Math/Int24.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/openVulkanoCpp/Math/Int24.hpp b/openVulkanoCpp/Math/Int24.hpp index a73c458..dc07c13 100644 --- a/openVulkanoCpp/Math/Int24.hpp +++ b/openVulkanoCpp/Math/Int24.hpp @@ -118,11 +118,23 @@ namespace OpenVulkano { return operator int() <=> static_cast(other); } + + template friend + struct std::hash; }; } namespace std { + template<> + struct hash + { + std::size_t operator()(const OpenVulkano::int24& value) const + { + return hash()(static_cast(value)); + } + }; + template <> class numeric_limits {