diff --git a/include/Nazara/Core/Flags.inl b/include/Nazara/Core/Flags.inl index cb51a277a..38fa6da74 100644 --- a/include/Nazara/Core/Flags.inl +++ b/include/Nazara/Core/Flags.inl @@ -3,6 +3,7 @@ // For conditions of distribution and use, see copyright notice in Config.hpp #include +#include #include namespace Nz @@ -375,4 +376,19 @@ namespace Nz } } +namespace std +{ + template + struct hash> + { + std::size_t operator()(const Nz::Flags& flags) + { + using UnderlyingType = typename Nz::Flags::BitField; + using Hasher = hash; + Hasher hasher; + return hasher(static_cast(flags)); + } + }; +} + #include