-
-
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
Visual Studio seems not to have all min() function versions #581
Comments
It should still be std::min, but yeah, I don't see any reason to use the initializer_list version instead of the two parameter version here. |
I did not know that MSVC does not support the initializer-list version - according to cppreference it is C++11. Anyway, I shall replace it with the other version. |
@j-k Could you please check if the fix works for you? |
I didn't know that it wouldn't support it either until this issue was posted. :) |
cloned today, had the same issue, the suggested fix in the first post worked. |
Thanks! |
I should have added the error msgs and line number: |
I don't understand: I fixed this with commit 9b764ee. Does it still not work? |
Line 8936: |
Which version of MSVC is this? |
C:\Program Files (x86)\Microsoft Visual Studio 14.0>cl |
This version is not supported, see https://github.com/nlohmann/json#supported-compilers. |
OK, thank you. |
No worries. :) |
Just to be clear, |
This is strange - this version is supported. But AppVeyor has no issues building and executing the tests. |
I had another look: AppVeyor compiles the code without issues with Microsoft (R) Build Engine version 14.0.25420.1: https://ci.appveyor.com/project/nlohmann/json/build/job/74yfdd5tjwk0i7s1 Maybe this is related: #603 |
Needed to change the line 8972 if the current version to:
std::string(start + offset, min(length, max_length - offset));
in order to make it compile
The text was updated successfully, but these errors were encountered: