Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icc16 error #617

Closed
vsakharuk opened this issue Jun 13, 2017 · 2 comments
Closed

icc16 error #617

vsakharuk opened this issue Jun 13, 2017 · 2 comments
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)

Comments

@vsakharuk
Copy link

vsakharuk commented Jun 13, 2017

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

@nlohmann
Copy link
Owner

@nlohmann
Copy link
Owner

nlohmann commented Jul 8, 2017

The problem is fixed with the (yet unreleased) 3.x.x series (see develop branch). For the 2.x.x series, I do not plan any new releases. With the fix described here, I close this issue. Sorry for the inconvenience.

@nlohmann nlohmann added 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) labels Jul 8, 2017
@nlohmann nlohmann closed this as completed Jul 8, 2017
@nlohmann nlohmann added the platform: icc related to Intel compiler label Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

2 participants