Merge pull request 'I forgot to add hash class to int24... Sorry!' (#162) from int24_hash into master

Reviewed-on: https://git.madvoxel.net/OpenVulkano/OpenVulkano/pulls/162
Reviewed-by: Georg Hagen <georg.hagen@madvoxel.com>
This commit is contained in:
Vladyslav_Baranovskyi_EXT
2024-11-10 18:32:03 +01:00

View File

@@ -118,11 +118,23 @@ namespace OpenVulkano
{
return operator int() <=> static_cast<int>(other);
}
template<typename Key> friend
struct std::hash;
};
}
namespace std
{
template<>
struct hash<OpenVulkano::int24>
{
std::size_t operator()(const OpenVulkano::int24& value) const
{
return hash<int>()(static_cast<int>(value));
}
};
template <>
class numeric_limits<OpenVulkano::int24>
{