-
-
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 when using with another library #1577
Comments
@nlohmann or @theodelrieu correct me if I'm wrong, but it seems that there is some interference with |
@bl4ck5un can you provide an example of what you input and where the supposed error is? |
never mind guys, it's a messy project and hard to extract a small example. I can work it around by arranging the header carefully. Will reopen with a reproducible example when I have one. Thanks anyway. |
The compilation error is caused by nullptr has been defined as 0 in ub_common_def.h when compiling with clang.
clang defines GNUC/MINOR/PATCHLEVEL as 4/2/1, i.e. compat with GCC 4.2.1. Correct gcc version check could be So it might be helpful to insert some nullptr type checking with static_assert. |
@x-santiaga-x Did you mean to submit this report to the library containing |
I have discovered this error trying to compile my own project with the same #ifdef and it was hard to find. |
To be honest, I'm not sure if this is a bug in this library, as it only happens when used together with another library, and only on macOS. But I'd appreciate any insight the authors might have. The error message appears agnostic to the other library in question.
In my case, as long as https://github.com/unbound-tech/blockchain-crypto-mpc/blob/master/src/utils/ub_common_def.h is included along with
json.hpp
, the compilation would fail.develop
branch?v3.6.1
is used.The text was updated successfully, but these errors were encountered: