-
-
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
VS2017 min / max problem for 2.1.1 #506
Comments
Thanks for reporting. Could you please post the error message that occurs when you don't add the fix? |
many of them: json.hpp(6926): error C2589: '(': illegal token on right side of '::' |
From what I learned about here, this is not a bug in the library, but in headers like #define NOMINMAX
#include <windows.h>
#undef NOMINMAX The library is not even using |
thanks let me check |
works perfectly! |
Great. I shall merge the fix to |
ok thanks |
When <Windows.h> is included with MSVC, a macro NOMINMAX is defined that yields compilation errors when max/min calls are encountered. This can be fixed by un-defining NOMINMAX, or by placing parentheses around all min/max calls. We chose the latter.
it's helpful,thanks a lot |
In order to avoid some problem with VS2017 I've put this line in my json.hpp 2.1.1
I don't know how to fix it properly
The text was updated successfully, but these errors were encountered: