-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Compilation error with ICPC compiler #1068
Comments
Which version of the library are you using? Which compiler version are you using? Which program are you trying to compile? |
I'm using icpc from Intel Parallel Studio 16.4, |
Does the error still occur with 3.1.2? How does the program look like? What is the call to the library that fails? |
Error is reproduced in 3.1.2, too.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@nlohmann I can reproduce this issue with the Intel compiler version 17.0 Update 4 on Windows, nlohmann json v3.1.2. The error I get is:
The switch /Qstd=c++11 is set, so C++11 should be available. Any hints on what to do to get a solution? It seems others were able to resolve this somehow. |
@nlohmann Found the issue. The following code exists three times: in has_from_json, has_non_default_from_json, has_to_json.
All three instances lead the the compiler error in my previous comment. If we change this to
then it works. So we just need to insert a space to change '>>' to '> >'. To me, this looks clearly like an Intel compiler bug when using >> in [nested?] templates, maybe mixed with decltype or declval. |
Thanks for reporting! |
Hello!
What could you say about #994 issue?
I have a similar problem using the ICPC compiler.
...\json.hpp(904): error : type name is not allowed
detect(std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value;
...\json.hpp(920): error : type name is not allowed
std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value;
...\json.hpp(935): error : type name is not allowed
std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value;
I use the following flags:
icpc -qopenmp -Wall -otarget/main-uname -m main.cpp
Could you help me?
Best regards!
Stefan
The text was updated successfully, but these errors were encountered: