From 58908295520c5f5d0003ce0694099c279acec608 Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Tue, 19 Sep 2017 10:54:15 -0400 Subject: [PATCH] Fixes static_assert on arm and ppc builds --- src/serialization/json_object.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/serialization/json_object.cpp b/src/serialization/json_object.cpp index ead3fdd58..e35389f9c 100644 --- a/src/serialization/json_object.cpp +++ b/src/serialization/json_object.cpp @@ -29,6 +29,7 @@ #include "json_object.h" #include +#include #include "string_tools.h" namespace cryptonote @@ -52,8 +53,9 @@ namespace void convert_numeric(Source source, Type& i) { static_assert( + (std::is_same() && std::is_same()) || std::numeric_limits::is_signed == std::numeric_limits::is_signed, - "source and destination signs do not match" + "comparisons below may have undefined behavior" ); if (source < std::numeric_limits::min()) {