-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
VS2008: warning C4003 - min/max problem #1156
Comments
I see that you're right. |
I can't give a definitive answer about when the next release will come out: I just contributed the min/max patches. There are some issues open about tagging a release: |
Found the same issue in reader.h line 1704 The solution in this thread fixed the issue. Thank you! |
The issue is exactly what is described here and here.
It seems that if I compile with VS2008 and <Windows.h> is included before <document.h>, a conflict between min and max macros arises.
The issue happens at lines 1008, 1014, 1015, 1032 and 1033 of <document.h> and can be fixed adding parentheses around the calls to
std::numeric_limits<float>::max
andstd::numeric_limits<float>::min
I mean that line 1008 should be changed from
&& (d < static_cast<double>(std::numeric_limits<uint64_t>::max()))
to
&& (d < static_cast<double>((std::numeric_limits<uint64_t>::max)()))
and so on....
Could you implement this fix, please?
The text was updated successfully, but these errors were encountered: