mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::json: Tuple defined(number) decides on max value rather than zero.
This commit is contained in:
parent
4540a32948
commit
e40f11429e
1 changed files with 3 additions and 1 deletions
|
@ -233,7 +233,9 @@ template<class T>
|
||||||
typename std::enable_if<is_number<T>(), bool>::type
|
typename std::enable_if<is_number<T>(), bool>::type
|
||||||
defined(T&& t)
|
defined(T&& t)
|
||||||
{
|
{
|
||||||
return !is_zero{}(t);
|
// :-(
|
||||||
|
using type = typename std::decay<T>::type;
|
||||||
|
return t != std::numeric_limits<type>::max();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class dst,
|
template<class dst,
|
||||||
|
|
Loading…
Reference in a new issue