From e40f11429ef5b9fd526bf9a56082ccfbd03e6711 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 8 Feb 2018 14:01:53 -0800 Subject: [PATCH] ircd::json: Tuple defined(number) decides on max value rather than zero. --- include/ircd/json/tuple/tuple.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ircd/json/tuple/tuple.h b/include/ircd/json/tuple/tuple.h index 1e59bffc0..9987c4951 100644 --- a/include/ircd/json/tuple/tuple.h +++ b/include/ircd/json/tuple/tuple.h @@ -233,7 +233,9 @@ template typename std::enable_if(), bool>::type defined(T&& t) { - return !is_zero{}(t); + // :-( + using type = typename std::decay::type; + return t != std::numeric_limits::max(); } template