Specializing numeric_limits for float16 in any case

This commit is contained in:
Vladyslav Baranovskyi
2024-11-07 16:01:46 +02:00
parent e9c19b42da
commit 649d8a07f3

View File

@@ -236,7 +236,14 @@ namespace std
return hash<uint16_t>()(key.m_data); return hash<uint16_t>()(key.m_data);
} }
}; };
}
#endif
#undef __has_keyword
namespace std
{
template <> template <>
class numeric_limits<float16> class numeric_limits<float16>
{ {
@@ -279,9 +286,5 @@ namespace std
}; };
} }
#endif
#undef __has_keyword
typedef float16 fp16; typedef float16 fp16;
typedef float16 half; typedef float16 half;