0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd::json: Tuple defined(number) decides on max value rather than zero.

This commit is contained in:
Jason Volk 2018-02-08 14:01:53 -08:00
parent 4540a32948
commit e40f11429e

View file

@ -233,7 +233,9 @@ template<class T>
typename std::enable_if<is_number<T>(), bool>::type
defined(T&& t)
{
return !is_zero{}(t);
// :-(
using type = typename std::decay<T>::type;
return t != std::numeric_limits<type>::max();
}
template<class dst,