1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

workaround GCC < 7.0 bug

template specialization from namespace must be enclosed in the namespace
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
This commit is contained in:
Andrey Filipenkov 2022-08-17 15:31:19 +03:00
parent 44174da9a2
commit a5f9efb3df

View File

@ -142,7 +142,9 @@ public:
VCMI_LIB_NAMESPACE_END
template <> struct std::hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
namespace std
{
template <> struct hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
{
size_t operator()(const VCMI_LIB_WRAP_NAMESPACE(ResourceID) & resourceIdent) const
{
@ -151,3 +153,4 @@ template <> struct std::hash<VCMI_LIB_WRAP_NAMESPACE(ResourceID)>
return stringHasher(resourceIdent.getName()) ^ intHasher(static_cast<int>(resourceIdent.getType()));
}
};
}