What is the issue you have?
A compilation error just including parts of the standard library and this library in a specific order when using C++17 and GCC 10.
Please describe the steps to reproduce the issue.
Consider the following file:
#include <any>
#include <nlohmann/json>
When compiling it in C++17 mode, it won't compile with GCC 10
Here's a compile explorer link that shows the issue.
When changing <any> to <variant>, there is no issue. I don't know if any other standard header causes this bug.
When putting the #include <any> after #include <nlohmann/json>, it compiles. DEMO.
What is the expected behavior?
It should compile.
And what is the actual behavior instead?
It shows very strange errors and fail to compile.
Which compiler and operating system are you using?
- Compiler: GCC 10
- Operating system: Arch Linux
Which version of the library did you use?
I had issues with some CMake related tests but it seem unrelated to this bug.
What is the issue you have?
A compilation error just including parts of the standard library and this library in a specific order when using C++17 and GCC 10.
Please describe the steps to reproduce the issue.
Consider the following file:
When compiling it in C++17 mode, it won't compile with GCC 10
Here's a compile explorer link that shows the issue.
When changing
<any>to<variant>, there is no issue. I don't know if any other standard header causes this bug.When putting the
#include <any>after#include <nlohmann/json>, it compiles. DEMO.What is the expected behavior?
It should compile.
And what is the actual behavior instead?
It shows very strange errors and fail to compile.
Which compiler and operating system are you using?
Which version of the library did you use?
developbranchIf you experience a compilation error: can you compile and run the unit tests?
I had issues with some CMake related tests but it seem unrelated to this bug.