aboutsummaryrefslogtreecommitdiff
path: root/src/serialization
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2017-09-19 10:54:15 -0400
committerLee Clagett <code@leeclagett.com>2017-09-19 10:57:01 -0400
commit58908295520c5f5d0003ce0694099c279acec608 (patch)
treed231dd13f985bfaa99085181b91b6736ff6479f6 /src/serialization
parentMerge pull request #2446 (diff)
downloadmonero-58908295520c5f5d0003ce0694099c279acec608.tar.xz
Fixes static_assert on arm and ppc builds
Diffstat (limited to '')
-rw-r--r--src/serialization/json_object.cpp4
1 files changed, 3 insertions, 1 deletions
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 <limits>
+#include <type_traits>
#include "string_tools.h"
namespace cryptonote
@@ -52,8 +53,9 @@ namespace
void convert_numeric(Source source, Type& i)
{
static_assert(
+ (std::is_same<Type, char>() && std::is_same<Source, int>()) ||
std::numeric_limits<Source>::is_signed == std::numeric_limits<Type>::is_signed,
- "source and destination signs do not match"
+ "comparisons below may have undefined behavior"
);
if (source < std::numeric_limits<Type>::min())
{