Skip to content

icc16 error #617

Description

@vsakharuk

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, "")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: iccrelated to Intel compilersolution: proposed fixa fix for the issue has been proposed and waits for confirmationsolution: wontfixthe issue will not be fixed (either it is impossible or deemed out of scope)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions