icc16 error #617
Labels
platform: icc
related to Intel compiler
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
solution: wontfix
the issue will not be fixed (either it is impossible or deemed out of scope)
Hello folks,
2.1.1 does not compile with icc 16, while works with clang and gcc.
Error:
json.hpp(11227): error: expression must have a constant value static_assert(std::is_signed<T>() == std::is_signed<decltype(x)>(), ""); ^ detected during: instantiation of "bool nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer>::lexer::strtonum::to(T &) const [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=bool, NumberIntegerType=int64_t={long}, NumberUnsignedType=uint64_t={unsigned long}, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann::adl_serializer, T=uint64_t={unsigned long}, <unnamed>=void]" at line 11275
May I suggest to replace line 11227
static_assert(std::is_signed<T>() == std::is_signed<decltype(x)>(), "");
with
static_assert(std::is_signed<T>::value == std::is_signed<decltype(x)>(), "");
Regards V.
Edit:
Sorry that patch does not help all the time. This one complies with icc:
static_assert(std::is_signed<T>::value == std::is_signed<decltype(x)>::value, "")
The text was updated successfully, but these errors were encountered: